sqlglot
sqlglot copied to clipboard
fix(spark): CREATE TABLE ... PARTITIONED BY fixes
Spark 3 supports two CREATE TABLE formats: https://spark.apache.org/docs/latest/sql-ref-syntax-ddl-create-table-hiveformat.html https://spark.apache.org/docs/latest/sql-ref-syntax-ddl-create-table-datasource.html
Some of the spark dialect assumes the former, some assumes the latter, and you can easily end up with an invalid statement.
All this DDL transpilation feels very messy to me... I hated this change.