forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
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
109861: sql: disable order by index in aggregate decoration clauses r=rharding6373 a=rharding6373 Before this change, queries like `SELECT percentile_disc ( 0.50 ) WITHIN GROUP ( ORDER BY PRIMARY KEY tbl ) FROM tbl;` would fail with an internal error. This is due to optbuilder expecting an order expression, which order by index does not provide, in the aggregate case in order to resolve the function. Since this functionality has never worked and appears to be a rare or never used feature, this PR disables queries with order by index in this position at the parsing stage. Issue cockroachdb#109847 has been opened to track usage. Epic: None Fixes: cockroachdb#109069 Informs: cockroachdb#109847 Release note: None. 110016: github: split up spanconfig(ccl) owners r=arulajmani,rafiss a=kvoli Prior to this commit, `kv-prs` was the owner of `pkg/spanconfig` and `pkg/ccl/spanconfigccl`. Package ownership is updated to reflect the ownership split between `kv-prs` and `sql-foundations`. See CODEOWNERS for the split. Epic: none Release note: None 110029: roachtest: fix calls to schemachange workload in acceptance/version-upgrade r=fqazi a=renatolabs The `schemachange` workload would always be called in that test; however, we are currently only staging the `workload` binary build on the SHA being tested; this is insufficient now that we test multiple upgrades in `mixedversion` tests. We fix the immediate issue by not invoking the workload when we are not performing an upgrade or downgrade involving the current cockroach binary. In the future, it would be nice to stage multiple workload binaries and use the appropriate one in the mixed-version hook. Epic: none Release note: None Co-authored-by: rharding6373 <[email protected]> Co-authored-by: Austen McClernon <[email protected]> Co-authored-by: Renato Costa <[email protected]>
- Loading branch information
Showing
6 changed files
with
86 additions
and
33 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
sort_clause ::= | ||
'ORDER' 'BY' a_expr 'ASC' 'NULLS' 'FIRST' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
| 'ORDER' 'BY' a_expr 'ASC' 'NULLS' 'LAST' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
| 'ORDER' 'BY' a_expr 'ASC' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
| 'ORDER' 'BY' a_expr 'DESC' 'NULLS' 'FIRST' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
| 'ORDER' 'BY' a_expr 'DESC' 'NULLS' 'LAST' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
| 'ORDER' 'BY' a_expr 'DESC' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
| 'ORDER' 'BY' a_expr 'NULLS' 'FIRST' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
| 'ORDER' 'BY' a_expr 'NULLS' 'LAST' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
| 'ORDER' 'BY' a_expr ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
| 'ORDER' 'BY' 'PRIMARY' 'KEY' table_name 'ASC' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
| 'ORDER' 'BY' 'PRIMARY' 'KEY' table_name 'DESC' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
| 'ORDER' 'BY' 'PRIMARY' 'KEY' table_name ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
| 'ORDER' 'BY' 'INDEX' table_name '@' index_name 'ASC' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
| 'ORDER' 'BY' 'INDEX' table_name '@' index_name 'DESC' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
| 'ORDER' 'BY' 'INDEX' table_name '@' index_name ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) | 'PRIMARY' 'KEY' table_name ( 'ASC' | 'DESC' | ) | 'INDEX' table_name '@' index_name ( 'ASC' | 'DESC' | ) ) ) )* | ||
'ORDER' 'BY' a_expr 'ASC' 'NULLS' 'FIRST' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) ) | ',' sortby_index ) )* | ||
| 'ORDER' 'BY' a_expr 'ASC' 'NULLS' 'LAST' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) ) | ',' sortby_index ) )* | ||
| 'ORDER' 'BY' a_expr 'ASC' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) ) | ',' sortby_index ) )* | ||
| 'ORDER' 'BY' a_expr 'DESC' 'NULLS' 'FIRST' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) ) | ',' sortby_index ) )* | ||
| 'ORDER' 'BY' a_expr 'DESC' 'NULLS' 'LAST' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) ) | ',' sortby_index ) )* | ||
| 'ORDER' 'BY' a_expr 'DESC' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) ) | ',' sortby_index ) )* | ||
| 'ORDER' 'BY' a_expr 'NULLS' 'FIRST' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) ) | ',' sortby_index ) )* | ||
| 'ORDER' 'BY' a_expr 'NULLS' 'LAST' ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) ) | ',' sortby_index ) )* | ||
| 'ORDER' 'BY' a_expr ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) ) | ',' sortby_index ) )* | ||
| 'ORDER' 'BY' sortby_index ( ( ',' ( a_expr ( 'ASC' | 'DESC' | ) ( 'NULLS' 'FIRST' | 'NULLS' 'LAST' | ) ) | ',' sortby_index ) )* |
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