diff options
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, - } |