-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] Report sorting in unique mode #4294
Conversation
@@ -1962,45 +1962,29 @@ def getRunResults(self, run_ids, limit, offset, sort_types, | |||
ReportAnnotations.value)])).label(f"annotation_{col}") | |||
|
|||
if report_filter.isUnique: | |||
# A report annotation filter cannot set in WHERE clause if we |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# A report annotation filter cannot set in WHERE clause if we | |
# A report annotation filter cannot be set in WHERE clause if we |
@@ -1962,45 +1962,29 @@ def getRunResults(self, run_ids, limit, offset, sort_types, | |||
ReportAnnotations.value)])).label(f"annotation_{col}") | |||
|
|||
if report_filter.isUnique: | |||
# A report annotation filter cannot set in WHERE clause if we | |||
# use annotation parameters in aggregate functions to create | |||
# pivot table. Instead filtering report annotations in WHERE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# pivot table. Instead filtering report annotations in WHERE | |
# a pivot table. Instead of filtering report annotations in WHERE |
# clause, we should use HAVING clause only for filtering | ||
# aggregate functions. | ||
# TODO: Fixing report annotation filter in every report server | ||
# enpoint function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# enpoint function. | |
# endpoint function. |
# aggregate functions. | ||
# TODO: Fixing report annotation filter in every report server | ||
# enpoint function. | ||
report_filter_annotations = report_filter.annotations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
report_filter_annotations = report_filter.annotations | |
annotations_backup = report_filter.annotations |
Maybe such a name could cause less misunderstanding compared to that one-character difference.
9894fc7
to
41866cb
Compare
Fixing report sorting on unique mode. After modifying the DB schema in Ericsson#4089 PR, the unique mode query of getRunResults endpoint has been changed, therefore, the report sorting is not working properly. Now, the unique mode query is redesigned and it use row_number() function to filter unique reports correctly. Where clause is also modified. It is getting rid of report annotation filter. Filtering annotation remains in having clause.
41866cb
to
cc7e526
Compare
Fixing report sorting on unique mode. After modifying the DB schema in #4089 PR, the unique mode query of getRunResults endpoint has been changed, therefore, the report sorting is not working properly.
Now, the unique mode query is redesigned and it use row_number() function to filter unique reports correctly. Where clause is also modified. It is getting rid of report annotation filter. Filtering annotation remains in having clause.