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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]