summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_databricks.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-03 06:02:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-03 06:02:47 +0000
commite67dc36ad88f4bbf01ffb495fe2ae846424ac015 (patch)
tree4d0c88b54afb1aafaa01ace15650affa6f436195 /tests/dialects/test_databricks.py
parentAdding upstream version 10.5.10. (diff)
downloadsqlglot-e67dc36ad88f4bbf01ffb495fe2ae846424ac015.tar.xz
sqlglot-e67dc36ad88f4bbf01ffb495fe2ae846424ac015.zip
Adding upstream version 10.6.0.upstream/10.6.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_databricks.py')
-rw-r--r--tests/dialects/test_databricks.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/dialects/test_databricks.py b/tests/dialects/test_databricks.py
index 7560d61..1d80dc0 100644
--- a/tests/dialects/test_databricks.py
+++ b/tests/dialects/test_databricks.py
@@ -102,3 +102,18 @@ class TestDatabricks(Validator):
"databricks": "SELECT DATEADD(DAY, 1, '2020-01-01')",
},
)
+
+ def test_without_as(self):
+ self.validate_all(
+ "CREATE TABLE x (SELECT 1)",
+ write={
+ "databricks": "CREATE TABLE x AS (SELECT 1)",
+ },
+ )
+
+ self.validate_all(
+ "WITH x (select 1) SELECT * FROM x",
+ write={
+ "databricks": "WITH x AS (SELECT 1) SELECT * FROM x",
+ },
+ )