Adding upstream version 26.16.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
4bfa0e7e53
commit
6e767a6f98
110 changed files with 62370 additions and 61414 deletions
|
@ -317,8 +317,8 @@ class TestHive(Validator):
|
|||
write={
|
||||
"duckdb": "DATE_DIFF('DAY', CAST(b AS DATE), CAST(a AS DATE))",
|
||||
"presto": "DATE_DIFF('DAY', CAST(CAST(b AS TIMESTAMP) AS DATE), CAST(CAST(a AS TIMESTAMP) AS DATE))",
|
||||
"hive": "DATEDIFF(TO_DATE(a), TO_DATE(b))",
|
||||
"spark": "DATEDIFF(TO_DATE(a), TO_DATE(b))",
|
||||
"hive": "DATEDIFF(a, b)",
|
||||
"spark": "DATEDIFF(a, b)",
|
||||
"": "DATEDIFF(CAST(a AS DATE), CAST(b AS DATE))",
|
||||
},
|
||||
)
|
||||
|
@ -379,8 +379,8 @@ class TestHive(Validator):
|
|||
write={
|
||||
"duckdb": "DATE_DIFF('DAY', CAST(x AS DATE), CAST(y AS DATE))",
|
||||
"presto": "DATE_DIFF('DAY', CAST(CAST(x AS TIMESTAMP) AS DATE), CAST(CAST(CAST(CAST(y AS TIMESTAMP) AS DATE) AS TIMESTAMP) AS DATE))",
|
||||
"hive": "DATEDIFF(TO_DATE(y), TO_DATE(x))",
|
||||
"spark": "DATEDIFF(TO_DATE(y), TO_DATE(x))",
|
||||
"hive": "DATEDIFF(TO_DATE(y), x)",
|
||||
"spark": "DATEDIFF(TO_DATE(y), x)",
|
||||
"": "DATEDIFF(CAST(y AS DATE), CAST(x AS DATE))",
|
||||
},
|
||||
)
|
||||
|
@ -401,8 +401,8 @@ class TestHive(Validator):
|
|||
write={
|
||||
"duckdb": f"{unit}(CAST(x AS DATE))",
|
||||
"presto": f"{unit}(CAST(CAST(x AS TIMESTAMP) AS DATE))",
|
||||
"hive": f"{unit}(TO_DATE(x))",
|
||||
"spark": f"{unit}(TO_DATE(x))",
|
||||
"hive": f"{unit}(x)",
|
||||
"spark": f"{unit}(x)",
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -418,6 +418,8 @@ class TestHive(Validator):
|
|||
)
|
||||
|
||||
def test_hive(self):
|
||||
self.validate_identity("TO_DATE(TO_DATE(x))")
|
||||
self.validate_identity("DAY(TO_DATE(x))")
|
||||
self.validate_identity("SELECT * FROM t WHERE col IN ('stream')")
|
||||
self.validate_identity("SET hiveconf:some_var = 5", check_command_warning=True)
|
||||
self.validate_identity("(VALUES (1 AS a, 2 AS b, 3))")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue