1
0
Fork 0

Merging upstream version 25.7.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:51:42 +01:00
parent dba379232c
commit aa0eae236a
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
102 changed files with 52995 additions and 52070 deletions

View file

@ -308,6 +308,14 @@ class TestDuckDB(Validator):
"SELECT JSON_EXTRACT(c, '$.k1') = 'v1'",
"SELECT (c -> '$.k1') = 'v1'",
)
self.validate_identity(
"SELECT JSON_EXTRACT(c, '$[*].id')[0:2]",
"SELECT (c -> '$[*].id')[0 : 2]",
)
self.validate_identity(
"SELECT JSON_EXTRACT_STRING(c, '$[*].id')[0:2]",
"SELECT (c ->> '$[*].id')[0 : 2]",
)
self.validate_identity(
"""SELECT '{"foo": [1, 2, 3]}' -> 'foo' -> 0""",
"""SELECT '{"foo": [1, 2, 3]}' -> '$.foo' -> '$[0]'""",
@ -1048,7 +1056,14 @@ class TestDuckDB(Validator):
"CAST([STRUCT_PACK(a := 1)] AS STRUCT(a BIGINT)[])",
"CAST([ROW(1)] AS STRUCT(a BIGINT)[])",
)
self.validate_identity(
"STRUCT_PACK(a := 'b')::json",
"CAST({'a': 'b'} AS JSON)",
)
self.validate_identity(
"STRUCT_PACK(a := 'b')::STRUCT(a TEXT)",
"CAST(ROW('b') AS STRUCT(a TEXT))",
)
self.validate_all(
"CAST(x AS VARCHAR(5))",
write={