summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_dialect.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-04 07:24:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-04 07:24:05 +0000
commit621555af37594a213d91ea113d5fc7739af84d40 (patch)
tree5aaa3b586692062accffc21cfaaa5a3917ee77b3 /tests/dialects/test_dialect.py
parentAdding upstream version 10.2.9. (diff)
downloadsqlglot-621555af37594a213d91ea113d5fc7739af84d40.tar.xz
sqlglot-621555af37594a213d91ea113d5fc7739af84d40.zip
Adding upstream version 10.4.2.upstream/10.4.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_dialect.py')
-rw-r--r--tests/dialects/test_dialect.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/dialects/test_dialect.py b/tests/dialects/test_dialect.py
index ee67bf1..ced7102 100644
--- a/tests/dialects/test_dialect.py
+++ b/tests/dialects/test_dialect.py
@@ -333,7 +333,7 @@ class TestDialect(Validator):
"drill": "CAST('2020-01-01' AS DATE)",
"duckdb": "CAST('2020-01-01' AS DATE)",
"hive": "TO_DATE('2020-01-01')",
- "presto": "DATE_PARSE('2020-01-01', '%Y-%m-%d %H:%i:%s')",
+ "presto": "CAST('2020-01-01' AS TIMESTAMP)",
"starrocks": "TO_DATE('2020-01-01')",
},
)
@@ -343,7 +343,7 @@ class TestDialect(Validator):
"drill": "CAST('2020-01-01' AS TIMESTAMP)",
"duckdb": "CAST('2020-01-01' AS TIMESTAMP)",
"hive": "CAST('2020-01-01' AS TIMESTAMP)",
- "presto": "DATE_PARSE('2020-01-01', '%Y-%m-%d %H:%i:%s')",
+ "presto": "CAST('2020-01-01' AS TIMESTAMP)",
},
)
self.validate_all(
@@ -723,23 +723,23 @@ class TestDialect(Validator):
read={
"postgres": "x->'y'",
"presto": "JSON_EXTRACT(x, 'y')",
- "starrocks": "x->'y'",
+ "starrocks": "x -> 'y'",
},
write={
"oracle": "JSON_EXTRACT(x, 'y')",
- "postgres": "x->'y'",
+ "postgres": "x -> 'y'",
"presto": "JSON_EXTRACT(x, 'y')",
- "starrocks": "x->'y'",
+ "starrocks": "x -> 'y'",
},
)
self.validate_all(
"JSON_EXTRACT_SCALAR(x, 'y')",
read={
- "postgres": "x->>'y'",
+ "postgres": "x ->> 'y'",
"presto": "JSON_EXTRACT_SCALAR(x, 'y')",
},
write={
- "postgres": "x->>'y'",
+ "postgres": "x ->> 'y'",
"presto": "JSON_EXTRACT_SCALAR(x, 'y')",
},
)
@@ -749,7 +749,7 @@ class TestDialect(Validator):
"postgres": "x#>'y'",
},
write={
- "postgres": "x#>'y'",
+ "postgres": "x #> 'y'",
},
)
self.validate_all(
@@ -758,7 +758,7 @@ class TestDialect(Validator):
"postgres": "x#>>'y'",
},
write={
- "postgres": "x#>>'y'",
+ "postgres": "x #>> 'y'",
},
)