nsivabalan commented on a change in pull request #3510:
URL: https://github.com/apache/hudi/pull/3510#discussion_r692629284
##########
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:
basically this create table statement will be ignored right? so, old
table schema remains.
For eg:
if original table had 3 fields.
and then alter table to add 4th field.
again, create table if not exists with 5 fields.
Is the final state of table is just 4 fields ?
--
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]