LuciferYang opened a new pull request, #11353: URL: https://github.com/apache/paimon/pull/11353
### Purpose Fixes #11351. Spark 4.2.0 (SPARK-33902) parses `CREATE TABLE ... LIKE ...` into the v2 `CreateTableLike` plan, which calls `TableCatalog.createTableLike` and fails with "paimon does not support CREATE TABLE LIKE". `RewriteCreateTableLikeCommand` only rewrites the v1 `CreateTableLikeCommand`, so on Spark 4.2 and 4.3 the statement failed for `SparkCatalog` and for `SparkGenericCatalog` with `USING paimon`. A new parser rule in the Spark 4.2 module, which the 4.3 module also compiles, turns `CreateTableLike` back into the fields `RewriteCreateTableLikeCommand` reads, building the storage format as Spark's v1 fallback does, and passes them to the same rewrite. A statement whose target is not a Paimon table is left to Spark. On Spark 4.2 and later the common parser loads the rule by name and no longer retries a CREATE TABLE LIKE that Spark fails to parse with Paimon's grammar, since Spark 4.2 accepts multipart names itself. ### Tests The Spark 4.2 module now runs the shared `DDLTestBase`, `DDLWithHiveCatalogTestBase` and `CatalogQualifiedCreateTableLikeTest`, which the spark42 and spark43 lanes did not run. 8 of their CREATE TABLE LIKE tests fail on Spark 4.2 without the rule. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
