Adding upstream version 6.2.6.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
8425a9678d
commit
d62bab68ae
49 changed files with 1741 additions and 566 deletions
|
@ -270,7 +270,7 @@ class TestBuild(unittest.TestCase):
|
|||
lambda: parse_one("SELECT * FROM y")
|
||||
.assert_is(exp.Select)
|
||||
.ctas("foo.x", properties={"format": "parquet", "y": "2"}),
|
||||
"CREATE TABLE foo.x STORED AS PARQUET TBLPROPERTIES ('y' = '2') AS SELECT * FROM y",
|
||||
"CREATE TABLE foo.x STORED AS PARQUET TBLPROPERTIES ('y'='2') AS SELECT * FROM y",
|
||||
"hive",
|
||||
),
|
||||
(lambda: and_("x=1", "y=1"), "x = 1 AND y = 1"),
|
||||
|
@ -308,6 +308,18 @@ class TestBuild(unittest.TestCase):
|
|||
lambda: exp.subquery("select x from tbl UNION select x from bar", "unioned").select("x"),
|
||||
"SELECT x FROM (SELECT x FROM tbl UNION SELECT x FROM bar) AS unioned",
|
||||
),
|
||||
(
|
||||
lambda: exp.update("tbl", {"x": None, "y": {"x": 1}}),
|
||||
"UPDATE tbl SET x = NULL, y = MAP('x', 1)",
|
||||
),
|
||||
(
|
||||
lambda: exp.update("tbl", {"x": 1}, where="y > 0"),
|
||||
"UPDATE tbl SET x = 1 WHERE y > 0",
|
||||
),
|
||||
(
|
||||
lambda: exp.update("tbl", {"x": 1}, from_="tbl2"),
|
||||
"UPDATE tbl SET x = 1 FROM tbl2",
|
||||
),
|
||||
]:
|
||||
with self.subTest(sql):
|
||||
self.assertEqual(expression().sql(dialect[0] if dialect else None), sql)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue