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
$ for filename in testdata/input/query/*.sql; do docker run --rm --platform linux/amd64 zetasql_ubuntu execute_query --product_mode=external --mode parse,unparse -- "$(cat ${filename})"; done > zetasql_log.txt
Syntax error: Expected "@" or "@@" or integer literal but got floating point literal "0.1" [at 2:36]
from x tablesample BERNOULLI (cast(0.1 as float64) percent),
^
Error on real instance
spanner> EXPLAIN
select cast(1 as INT64), cast(0.1 as float32), cast((struct(), 1, [2, 3], ["4", "5"]) as struct<struct<>, x int64, y array<int64>, z array<string>>)
from x tablesample BERNOULLI (cast(0.1 as float64) percent),
y tablesample BERNOULLI (cast(1 as int64) rows),
z tablesample BERNOULLI (cast(@param as int64) rows)
limit cast(1 as INT64) offset cast(@foo as INT64);
ERROR: spanner: code = "InvalidArgument", desc = "Syntax error: Expected \\\"@\\\" or \\\"@@\\\" or integer literal but got floating point literal \\\"0.1\\\" [at 2:36]\\nfrom x tablesample BERNOULLI (cast(0.1 as float64) percent),\\n ^"
spanner> SELECT
-> *
-> FROM
-> Singers A
-> HASH JOIN
-> Singers B
-> ON A.SingerID = B.SingerID
-> APPLY JOIN
-> Singer C
-> ON B.SingerID = C.SingerID
-> LOOP JOIN
-> Singer D
-> ON C.SingerID = D.SingerID
-> ;
ERROR: spanner: code = "InvalidArgument", desc = "Syntax error: Expected end of input but got identifier \"APPLY\" [at 8:3]\n APPLY JOIN\n ^"
Although these are valid values for the JOIN_METHOD hint, I don't think they are valid prefixes for JOIN, at least in the current implementation.
There are invalid GoogleSQL in testdata.
Error on real instance
Although these are valid values for the JOIN_METHOD hint, I don't think they are valid prefixes for JOIN, at least in the current implementation.
https://github.com/google/zetasql/blob/a516c6b26d183efc4f56293256bba92e243b7a61/zetasql/parser/zetasql.tm#L7713-L7718
I am doubting that
APPLY JOIN
has never been syntax, buttable_name APPLY JOIN
becomes valid because:It is valid query because it is interpreted as
The text was updated successfully, but these errors were encountered: