Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: Put DISTINCT before leaf project node
If a (non-injective) expression returns the same value given two different values as input, we want only one row rather than two - previously, since the DISTINCT node was placed *before* the leaf project node, we'd do a DISTINCT on the input columns but not the actual result values of the leaf projected expressions. Now, we always put DISTINCT last, which fixes the issue. Fixes: ENG-2959 Change-Id: I2b13f3ac692fb56f112d4726df2b6c72688f6ec8 Reviewed-on: https://gerrit.readyset.name/c/readyset/+/4801 Tested-by: Buildkite CI Reviewed-by: Dan Wilbanks <dan@readyset.io>
- Loading branch information
1 parent
4a31acd
commit 236ed82
Showing
2 changed files
with
34 additions
and
25 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