diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-08-06 07:48:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-08-06 07:48:11 +0000 |
commit | 379c6d1f52e1d311867c4f789dc389da1d9af898 (patch) | |
tree | c9ca62eb7b8b7e861cc67248850db220ad0881c9 /sqlglot/dialects/spark.py | |
parent | Releasing debian version 17.7.0-1. (diff) | |
download | sqlglot-379c6d1f52e1d311867c4f789dc389da1d9af898.tar.xz sqlglot-379c6d1f52e1d311867c4f789dc389da1d9af898.zip |
Merging upstream version 17.9.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/spark.py')
-rw-r--r-- | sqlglot/dialects/spark.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sqlglot/dialects/spark.py b/sqlglot/dialects/spark.py index 73f4370..b9aaa66 100644 --- a/sqlglot/dialects/spark.py +++ b/sqlglot/dialects/spark.py @@ -3,6 +3,7 @@ from __future__ import annotations import typing as t from sqlglot import exp +from sqlglot.dialects.dialect import rename_func from sqlglot.dialects.spark2 import Spark2 from sqlglot.helper import seq_get @@ -47,7 +48,11 @@ class Spark(Spark2): exp.DataType.Type.SMALLMONEY: "DECIMAL(6, 4)", exp.DataType.Type.UNIQUEIDENTIFIER: "STRING", } - TRANSFORMS = Spark2.Generator.TRANSFORMS.copy() + + TRANSFORMS = { + **Spark2.Generator.TRANSFORMS, + exp.StartsWith: rename_func("STARTSWITH"), + } TRANSFORMS.pop(exp.DateDiff) TRANSFORMS.pop(exp.Group) |