summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_teradata.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-16 09:41:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-16 09:41:15 +0000
commit358a09296d7198a4cc142f1976de8f3eb3318e58 (patch)
tree762db96c44014dc4db5e9fc7f6709c138589155e /tests/dialects/test_teradata.py
parentAdding upstream version 15.2.0. (diff)
downloadsqlglot-358a09296d7198a4cc142f1976de8f3eb3318e58.tar.xz
sqlglot-358a09296d7198a4cc142f1976de8f3eb3318e58.zip
Adding upstream version 16.2.1.upstream/16.2.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_teradata.py')
-rw-r--r--tests/dialects/test_teradata.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/dialects/test_teradata.py b/tests/dialects/test_teradata.py
index 9f789d0..6906e47 100644
--- a/tests/dialects/test_teradata.py
+++ b/tests/dialects/test_teradata.py
@@ -138,11 +138,15 @@ class TestTeradata(Validator):
def test_cast(self):
self.validate_all(
"CAST('1992-01' AS DATE FORMAT 'YYYY-DD')",
+ read={
+ "bigquery": "CAST('1992-01' AS DATE FORMAT 'YYYY-DD')",
+ },
write={
"teradata": "CAST('1992-01' AS DATE FORMAT 'YYYY-DD')",
- "databricks": "DATE_FORMAT('1992-01', 'YYYY-DD')",
- "mysql": "DATE_FORMAT('1992-01', 'YYYY-DD')",
- "spark": "DATE_FORMAT('1992-01', 'YYYY-DD')",
- "": "TIME_TO_STR('1992-01', 'YYYY-DD')",
+ "bigquery": "PARSE_DATE('%Y-%d', '1992-01')",
+ "databricks": "TO_DATE('1992-01', 'yyyy-dd')",
+ "mysql": "STR_TO_DATE('1992-01', '%Y-%d')",
+ "spark": "TO_DATE('1992-01', 'yyyy-dd')",
+ "": "STR_TO_DATE('1992-01', '%Y-%d')",
},
)