-
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.
smith: add all argument columns to ORDER BY
This commit ensures that sqlsmith adds all function argument columns to the `ORDER BY` clause when nondetermistic functions are disabled. This is necessary for functions like `string_agg`, for which there may be multiple possible values for each argument when the order is not specified. As a special case, `lead` and `lag` require all input columns to be added to the `ORDER BY` clause. This is because while they respect the specified order, they can still access any value in the partition. This means that we need to uniquely specify which rows fall on the boundaries of each peer group. We can ensure this is the case by ordering on a key, and we can trivially order on a key by ordering on all columns. Partially fixes #85318 Fixes #87023 Release justification: testing-only change Release note: None
- Loading branch information
1 parent
004533f
commit 20a1166
Showing
1 changed file
with
26 additions
and
24 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