LuciferYang opened a new issue, #11351:
URL: https://github.com/apache/paimon/issues/11351

   **Search before asking**
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   **Paimon version**
   master @ 3431d5fd13
   
   **Compute Engine**
   Spark 4.2.1 and 4.3.0. Spark 3.5 and 4.1 are not affected.
   
   **Minimal reproduce step**
   With Paimon's `SparkCatalog`:
   
   ```sql
   CREATE TABLE source_tbl (id INT, pt STRING) PARTITIONED BY (pt);
   CREATE TABLE target_tbl LIKE source_tbl;
   -- java.lang.UnsupportedOperationException: paimon does not support CREATE 
TABLE LIKE
   ```
   
   Through `SparkGenericCatalog`, `CREATE TABLE t2 LIKE paimon_source USING 
paimon` fails the same way with "spark_catalog does not support CREATE TABLE 
LIKE". With `STORED AS PARQUET`, the same error replaces Paimon's message that 
STORED AS is not supported for `SparkCatalog`.
   
   **What doesn't meet your expectations?**
   The statements should create the table as they do on Spark 3.5 and 4.1.
   
   **Anything else?**
   Spark 4.2.0 (SPARK-33902) parses the statement into the v2 `CreateTableLike` 
plan and runs it through `TableCatalog.createTableLike`, whose default 
implementation throws. Paimon's `RewriteCreateTableLikeCommand` only rewrites 
the v1 `CreateTableLikeCommand`, so it never sees the statement.
   
   The spark42 and spark43 CI lanes run only their own module's tests, not the 
shared suites in `paimon-spark-ut`, which is why `DDLTestBase`, 
`DDLWithHiveCatalogTestBase` and `CatalogQualifiedCreateTableLikeTest` did not 
catch this.
   
   **Are you willing to submit a PR?**
   - [x] I'm willing to submit a PR!
   


-- 
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]

Reply via email to