summaryrefslogtreecommitdiffstats
path: root/sqlglot/dialects/spark.py
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2023-12-10 10:45:55 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2023-12-10 10:45:55 +0000
commit02df6cdb000c8dbf739abda2af321a4f90d1b059 (patch)
tree2fc1daf848082ff67a11e60025cac260e3c318b2 /sqlglot/dialects/spark.py
parentAdding upstream version 19.0.1. (diff)
downloadsqlglot-02df6cdb000c8dbf739abda2af321a4f90d1b059.tar.xz
sqlglot-02df6cdb000c8dbf739abda2af321a4f90d1b059.zip
Adding upstream version 20.1.0.upstream/20.1.0
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'sqlglot/dialects/spark.py')
-rw-r--r--sqlglot/dialects/spark.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/sqlglot/dialects/spark.py b/sqlglot/dialects/spark.py
index 1abfce6..ba73ac0 100644
--- a/sqlglot/dialects/spark.py
+++ b/sqlglot/dialects/spark.py
@@ -56,15 +56,17 @@ class Spark(Spark2):
def _parse_generated_as_identity(
self,
- ) -> exp.GeneratedAsIdentityColumnConstraint | exp.ComputedColumnConstraint:
+ ) -> (
+ exp.GeneratedAsIdentityColumnConstraint
+ | exp.ComputedColumnConstraint
+ | exp.GeneratedAsRowColumnConstraint
+ ):
this = super()._parse_generated_as_identity()
if this.expression:
return self.expression(exp.ComputedColumnConstraint, this=this.expression)
return this
class Generator(Spark2.Generator):
- SUPPORTS_NESTED_CTES = True
-
TYPE_MAPPING = {
**Spark2.Generator.TYPE_MAPPING,
exp.DataType.Type.MONEY: "DECIMAL(15, 4)",