You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/08/20 03:21:04 UTC

[GitHub] [hudi] pengzhiwei2018 commented on a change in pull request #3510: [HUDI-2339] Create Table If Not Exists Failed After Alter Table

pengzhiwei2018 commented on a change in pull request #3510:
URL: https://github.com/apache/hudi/pull/3510#discussion_r692629897



##########
File path: hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/TestCreateTable.scala
##########
@@ -505,4 +505,29 @@ class TestCreateTable extends TestHoodieSqlBase {
     }
   }
 
+  test("Test Create Table Exists In Catalog") {
+    val tableName = generateTableName
+    spark.sql(
+      s"""
+         |create table $tableName (
+         | id int,
+         | name string,
+         | price double
+         |) using hudi
+         |""".stripMargin
+    )
+
+    spark.sql(s"alter table $tableName add columns(ts bigint)")
+
+    // Check "create table if not exist" works after schema evolution.

Review comment:
       Yes, the create table if not exists will be ignored if the table has exists in the catalog.




-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org