-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reimplement
order_by
method for query results (DM-33164)
New implementation uses window function row_number() to generate ordering rank for DataIds query made by queryDataIds method. This value is stored as a separate colum by materialized query and also propagated to a top-level query where it is again used for ordering. This simplifies handling of the ordering columns by avoiding tracking them across different contexts, but it relies on the fact that there is only a single query that generates those values. If there needs to be a UNION of multiple queries, it cannot order results across multiple queries. As far as I can tell currently we don't need to UNIONize queries for queryDataIds or queryDimensionRecords purposes, so we should be OK.
- Loading branch information
Showing
7 changed files
with
280 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.