-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Previously, when a subquery was used with an alias in combination with a nested GROUP BY, the collapsing of the nested queries into a flattened `Aggregate` query, lead to wrong attribute qualifier on the external projection, which was still referencing the removed subquery. e.g.: For the following query: ``` SELECT languages FROM ( SELECT languages FROM test_emp GROUP BY languages ) AS subquery ``` The `languages` of the top level SELECT, was qualified with `subquery` which was removed during the flattening optimisation leading to Exception of not being able to resolve the refenced group: `test_emp.languages`. Fix this behaviour by introducing a new rule which precedes the `PruneSubqueryAliases` rules and updates the `qualifier` for the `FieldAttributes`. Fixes: #69263 (cherry picked from commit 1a2a3df)
- Loading branch information
Showing
6 changed files
with
134 additions
and
11 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
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