diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 05:12:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 05:12:42 +0000 |
commit | c51a9844b869fd7cd69e5cc7658d34f61a865185 (patch) | |
tree | 55706c65ce7e19626aabf7ff4dde0e1a51b739db /sqlglot/dialects/databricks.py | |
parent | Releasing debian version 18.17.0-1. (diff) | |
download | sqlglot-c51a9844b869fd7cd69e5cc7658d34f61a865185.tar.xz sqlglot-c51a9844b869fd7cd69e5cc7658d34f61a865185.zip |
Merging upstream version 19.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/databricks.py')
-rw-r--r-- | sqlglot/dialects/databricks.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sqlglot/dialects/databricks.py b/sqlglot/dialects/databricks.py index 314a821..b777db0 100644 --- a/sqlglot/dialects/databricks.py +++ b/sqlglot/dialects/databricks.py @@ -35,7 +35,7 @@ class Databricks(Spark): exp.DatetimeSub: lambda self, e: self.func( "TIMESTAMPADD", e.text("unit"), - exp.Mul(this=e.expression.copy(), expression=exp.Literal.number(-1)), + exp.Mul(this=e.expression, expression=exp.Literal.number(-1)), e.this, ), exp.DatetimeDiff: lambda self, e: self.func( @@ -63,21 +63,14 @@ class Databricks(Spark): and kind.this in exp.DataType.INTEGER_TYPES ): # only BIGINT generated identity constraints are supported - expression = expression.copy() expression.set("kind", exp.DataType.build("bigint")) return super().columndef_sql(expression, sep) def generatedasidentitycolumnconstraint_sql( self, expression: exp.GeneratedAsIdentityColumnConstraint ) -> str: - expression = expression.copy() expression.set("this", True) # trigger ALWAYS in super class return super().generatedasidentitycolumnconstraint_sql(expression) class Tokenizer(Spark.Tokenizer): HEX_STRINGS = [] - - SINGLE_TOKENS = { - **Spark.Tokenizer.SINGLE_TOKENS, - "$": TokenType.PARAMETER, - } |