forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
25455: opt/optbuilder: Fix bug with ORDER BY and aggregate alias r=rytaft a=rytaft This commit fixes a bug in which ordering by an alias of an aggregate causes an error. Queries such as: `SELECT SUM(a) AS a2 FROM abcd GROUP BY c ORDER BY a2` were incorrectly causing the error: `error: column "a2" must appear in the GROUP BY clause or be used in an aggregate function` This commit fixes that issue, so now the query builds successfully. Release note: None Co-authored-by: Rebecca Taft <[email protected]>
- Loading branch information
Showing
2 changed files
with
50 additions
and
1 deletion.
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