Merging upstream version 21.0.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
3759c601a7
commit
96b10de29a
115 changed files with 66603 additions and 60920 deletions
|
@ -227,9 +227,11 @@ TBLPROPERTIES (
|
|||
)
|
||||
|
||||
def test_spark(self):
|
||||
expr = parse_one("any_value(col, true)", read="spark")
|
||||
self.assertIsInstance(expr.args.get("ignore_nulls"), exp.Boolean)
|
||||
self.assertEqual(expr.sql(dialect="spark"), "ANY_VALUE(col, TRUE)")
|
||||
self.validate_identity("any_value(col, true)", "ANY_VALUE(col) IGNORE NULLS")
|
||||
self.validate_identity("first(col, true)", "FIRST(col) IGNORE NULLS")
|
||||
self.validate_identity("first_value(col, true)", "FIRST_VALUE(col) IGNORE NULLS")
|
||||
self.validate_identity("last(col, true)", "LAST(col) IGNORE NULLS")
|
||||
self.validate_identity("last_value(col, true)", "LAST_VALUE(col) IGNORE NULLS")
|
||||
|
||||
self.assertEqual(
|
||||
parse_one("REFRESH TABLE t", read="spark").assert_is(exp.Refresh).sql(dialect="spark"),
|
||||
|
@ -290,7 +292,7 @@ TBLPROPERTIES (
|
|||
self.validate_all(
|
||||
"SELECT FROM_UTC_TIMESTAMP('2016-08-31', 'Asia/Seoul')",
|
||||
write={
|
||||
"presto": "SELECT CAST('2016-08-31' AS TIMESTAMP) AT TIME ZONE 'Asia/Seoul'",
|
||||
"presto": "SELECT AT_TIMEZONE(CAST('2016-08-31' AS TIMESTAMP), 'Asia/Seoul')",
|
||||
"spark": "SELECT FROM_UTC_TIMESTAMP(CAST('2016-08-31' AS TIMESTAMP), 'Asia/Seoul')",
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue