You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at 2 tests (for both modes), inPredicateWithTableConstructor and notInPredicateWithTableConstructor, their queries are each, respectively:
SELECT VALUE b.title FROM stores[*].books[*] AS b WHERE (b.title, b.price) IN (VALUES ('A', 5e0), ('B', 3.0), ('X', 9.0))
SELECT VALUE b.title FROM stores[*].books[*] AS b WHERE (b.title, b.price) NOT IN (VALUES ('A', 5e0), ('B', 3.0), ('X', 9.0))
According to the EBNF, the IN predicate expects a parenthesis followed by row value expressions. Therefore, upon fixing the parse in partiql/partiql-lang-kotlin#1666, the two tests above fail. The reason is that the table value constructor (the VALUES expression) constructs a SINGLE expression. Therefore, the query is effectively asking: is (b.title, b.price) IN the collection holding a single value (the table value constructor), which holds multiple rows?
Therefore, I believe these conformance tests are wrong. In order to accurately ask the question, we would need to rephrase the 1st query to be EITHER:
(b.title, b.price) IN VALUES ('A', 5e0), ('B', 3.0), ('X', 9.0) (removing the parenthesis)
OR, (b.title, b.price) IN (('A', 5e0), ('B', 3.0), ('X', 9.0))
The text was updated successfully, but these errors were encountered:
See the SQL:1999 EBNF for the
<in predicate>
.Looking at 2 tests (for both modes),
inPredicateWithTableConstructor
andnotInPredicateWithTableConstructor
, their queries are each, respectively:SELECT VALUE b.title FROM stores[*].books[*] AS b WHERE (b.title, b.price) IN (VALUES ('A',
5e0), ('B', 3.0), ('X', 9.0))
SELECT VALUE b.title FROM stores[*].books[*] AS b WHERE (b.title, b.price) NOT IN (VALUES ('A',
5e0), ('B', 3.0), ('X', 9.0))
According to the EBNF, the IN predicate expects a parenthesis followed by row value expressions. Therefore, upon fixing the parse in partiql/partiql-lang-kotlin#1666, the two tests above fail. The reason is that the table value constructor (the
VALUES
expression) constructs a SINGLE expression. Therefore, the query is effectively asking: is(b.title, b.price)
IN the collection holding a single value (the table value constructor), which holds multiple rows?Therefore, I believe these conformance tests are wrong. In order to accurately ask the question, we would need to rephrase the 1st query to be EITHER:
(b.title, b.price) IN VALUES ('A',
5e0), ('B', 3.0), ('X', 9.0)
(removing the parenthesis)(b.title, b.price) IN (('A',
5e0), ('B', 3.0), ('X', 9.0))
The text was updated successfully, but these errors were encountered: