-
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.
Change top-level aggregate function tests to use
COLL_
(#76)
- Loading branch information
Showing
8 changed files
with
1,074 additions
and
758 deletions.
There are no files selected for viewing
111 changes: 111 additions & 0 deletions
111
partiql-tests-data-extended/fail/static-analysis/query/sql-aggregate.ion
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 |
---|---|---|
@@ -0,0 +1,111 @@ | ||
// Pending resolution of https://github.com/partiql/partiql-spec/issues/51#issuecomment-1498352752. | ||
// The following tests use SQL aggregation functions in contexts where a `COLL_` aggregation function is expected | ||
// (e.g. as a top-level query) | ||
|
||
spec_51::[ | ||
{ | ||
name:"top level AVG disallowed", | ||
statement:"AVG([1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
{ | ||
name:"top level AVG ALL disallowed", | ||
statement:"AVG(ALL [1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
{ | ||
name:"top level AVG DISTINCT disallowed", | ||
statement:"AVG(DISTINCT [1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
{ | ||
name:"top level COUNT disallowed", | ||
statement:"COUNT([1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
{ | ||
name:"top level COUNT ALL disallowed", | ||
statement:"COUNT(ALL [1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
{ | ||
name:"top level COUNT DISTINCT disallowed", | ||
statement:"COUNT(DISTINCT [1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
{ | ||
name:"top level MAX disallowed", | ||
statement:"MAX([1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
{ | ||
name:"top level MAX ALL disallowed", | ||
statement:"MAX(ALL [1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
{ | ||
name:"top level MAX DISTINCT disallowed", | ||
statement:"MAX(DISTINCT [1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
{ | ||
name:"top level MIN disallowed", | ||
statement:"MIN([1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
{ | ||
name:"top level MIN ALL disallowed", | ||
statement:"MIN(ALL [1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
{ | ||
name:"top level MIN DISTINCT disallowed", | ||
statement:"MIN(DISTINCT [1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
{ | ||
name:"top level SUM disallowed", | ||
statement:"SUM([1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
{ | ||
name:"top level SUM ALL disallowed", | ||
statement:"SUM(ALL [1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
{ | ||
name:"top level SUM DISTINCT disallowed", | ||
statement:"SUM(DISTINCT [1, 2, 3, 3])", | ||
assert: { | ||
result: StaticAnalysisFail | ||
}, | ||
}, | ||
] |
Oops, something went wrong.