1
0
Fork 0

Adding upstream version 21.0.2.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:22:05 +01:00
parent 91f2cef5f0
commit d51e69137a
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
58 changed files with 25616 additions and 25078 deletions

View file

@ -980,6 +980,12 @@ FROM READ_CSV('tests/fixtures/optimizer/tpc-h/nation.csv.gz', 'delimiter', '|')
self.assertEqual(expression.selects[0].type.sql(dialect="bigquery"), "STRUCT<`f` STRING>")
expression = annotate_types(
parse_one("SELECT unnest(t.x) FROM t AS t", dialect="postgres"),
schema={"t": {"x": "array<int>"}},
)
self.assertTrue(expression.selects[0].is_type("int"))
def test_type_annotation_cache(self):
sql = "SELECT 1 + 1"
expression = annotate_types(parse_one(sql))