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
I'm seeing a crash when I try to use a date inside of a STRUCT in UNNEST statement.
For reference, this query does NOT crash:
SELECT DATE(2022, 1, 1) AS a, b
FROM UNNEST([
STRUCT(1 AS b)
]);
But this very similar query that should produce the same results does:
SELECT a, b
FROM UNNEST([
STRUCT(DATE(2022, 1, 1) AS a, 1 AS b)
]);
This is the error log:
2022-08-29T23:38:03.026Z ERROR server/handler.go:40 internal error {"error": "failed to query SELECT zetasqlite_get_struct_field_date(`$unnest1#1`, 0) AS `a#2`,zetasqlite_get_struct_field_int64(`$unnest1#1`, 1) AS `b#3` FROM (SELECT json_each.value AS `$unnest1#1` FROM json_each(zetasqlite_decode_array_string(zetasqlite_make_array_array(zetasqlite_make_struct_struct('zetasqlite_date_date(2022,1,1)',zetasqlite_date_date(2022,1,1),'1',1))))): no such function: zetasqlite_make_array_array"}
I also see the same crash when using a different date function:
SELECT a, b
FROM UNNEST([
STRUCT(PARSE_DATE('%Y-%m-%d', '2022-01-01') AS a, 1 AS b)
]);
Thank you!
The text was updated successfully, but these errors were encountered:
I am actually also seeing this for a much simpler case where I have a NULL value in the struct:
SELECT a
FROM UNNEST([
STRUCT(NULL AS a)
]);
ageiduschek
changed the title
Crash when using DATE inside of an UNNEST statement
Crash when using DATE/NULL inside of an UNNEST statement
Aug 30, 2022
I'm seeing a crash when I try to use a date inside of a STRUCT in UNNEST statement.
For reference, this query does NOT crash:
But this very similar query that should produce the same results does:
This is the error log:
I also see the same crash when using a different date function:
Thank you!
The text was updated successfully, but these errors were encountered: