diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-10-16 11:37:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-10-16 11:37:39 +0000 |
commit | f10d022e11dcd1015db1a74ce9f4198ebdcb7f40 (patch) | |
tree | ac7bdc1d214a0f97f991cff14e933f4895ee68e1 /sqlglot/dialects/spark.py | |
parent | Releasing progress-linux version 18.11.6-1. (diff) | |
download | sqlglot-f10d022e11dcd1015db1a74ce9f4198ebdcb7f40.tar.xz sqlglot-f10d022e11dcd1015db1a74ce9f4198ebdcb7f40.zip |
Merging upstream version 18.13.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | sqlglot/dialects/spark.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sqlglot/dialects/spark.py b/sqlglot/dialects/spark.py index 2eaa2ae..8461920 100644 --- a/sqlglot/dialects/spark.py +++ b/sqlglot/dialects/spark.py @@ -76,6 +76,9 @@ class Spark(Spark2): exp.TimestampAdd: lambda self, e: self.func( "DATEADD", e.args.get("unit") or "DAY", e.expression, e.this ), + exp.TryCast: lambda self, e: self.trycast_sql(e) + if e.args.get("safe") + else self.cast_sql(e), } TRANSFORMS.pop(exp.AnyValue) TRANSFORMS.pop(exp.DateDiff) |