-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optbuilder: allow non-aggregate expressions when GROUP BY cols are un…
…ique This extends support for queries such as this pseudo-SQL: ``` SELECT * FROM t1 GROUP BY pk_cols; ``` To also support: ``` SELECT * FROM t1 GROUP BY unique_index_non_nullable_key_cols; SELECT * FROM t1 GROUP BY unique_without_index_non_nullable_key_cols; ``` All unique index or unique constraint columns must be not nullable for the query to not error out. Fixes: #99444 Release note (sql change): This patch adds support for non-aggregate expressions involving columns outside of the grouping columns when the grouping columns include all key columns of a unique index and those key columns are not nullable.
- Loading branch information
Mark Sirek
committed
Apr 18, 2023
1 parent
410c378
commit 080fd89
Showing
3 changed files
with
169 additions
and
4 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