Adding upstream version 19.0.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
03001ce1e6
commit
6a89523da4
91 changed files with 45416 additions and 43096 deletions
|
@ -6,10 +6,26 @@ class TestRedshift(Validator):
|
|||
dialect = "redshift"
|
||||
|
||||
def test_redshift(self):
|
||||
self.validate_identity(
|
||||
"SELECT DATE_DIFF('month', CAST('2020-02-29 00:00:00' AS TIMESTAMP), CAST('2020-03-02 00:00:00' AS TIMESTAMP))",
|
||||
"SELECT DATEDIFF(month, CAST(CAST('2020-02-29 00:00:00' AS TIMESTAMP) AS DATE), CAST(CAST('2020-03-02 00:00:00' AS TIMESTAMP) AS DATE))",
|
||||
)
|
||||
self.validate_identity(
|
||||
"SELECT * FROM x WHERE y = DATEADD('month', -1, DATE_TRUNC('month', (SELECT y FROM #temp_table)))",
|
||||
"SELECT * FROM x WHERE y = DATEADD(month, -1, CAST(DATE_TRUNC('month', (SELECT y FROM #temp_table)) AS DATE))",
|
||||
)
|
||||
|
||||
self.validate_all(
|
||||
"LISTAGG(sellerid, ', ')",
|
||||
read={
|
||||
"duckdb": "STRING_AGG(sellerid, ', ')",
|
||||
},
|
||||
write={
|
||||
# GROUP_CONCAT and STRING_AGG are aliases in DuckDB
|
||||
"duckdb": "GROUP_CONCAT(sellerid, ', ')",
|
||||
"redshift": "LISTAGG(sellerid, ', ')",
|
||||
},
|
||||
)
|
||||
self.validate_all(
|
||||
"SELECT APPROXIMATE COUNT(DISTINCT y)",
|
||||
read={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue