boneanxs commented on code in PR #9412:
URL: https://github.com/apache/hudi/pull/9412#discussion_r1290833633


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/TestCreateTable.scala:
##########
@@ -405,6 +405,145 @@ class TestCreateTable extends HoodieSparkSqlTestBase {
     }
   }
 
+  test("Test create table like") {
+    if (HoodieSparkUtils.gteqSpark3_1) {
+      // 1. Test create table from an existing HUDI table
+      withTempDir { tmp =>

Review Comment:
   Spark2 will use Spark own `CreateTableLikeCommand`, we can't throw error 
here since we can't distinguish whether the user want to create hudi table or 
not.
   
   ```scala
   * The syntax of using this command in SQL is(it doesn't support pass 
targetTable's provider):
    * {{{
    *   CREATE TABLE [IF NOT EXISTS] [db_name.]table_name
    *   LIKE [other_db_name.]existing_table_name [locationSpec]
    * }}}
   ```
   
   Spark2 is becoming depreciated, maybe only supporting spark3+ is enough?



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