leesf commented on code in PR #5588: URL: https://github.com/apache/hudi/pull/5588#discussion_r877141004
########## hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/TestCreateTable.scala: ########## @@ -763,4 +763,22 @@ class TestCreateTable extends HoodieSparkSqlTestBase { assertResult(true)(shown.contains("COMMENT 'This is a simple hudi table'")) } } + + test("Test CTAS using an illegal definition -- a COW table with compaction enabled.") { + val tableName = generateTableName + checkExceptionContain( + s""" + | create table $tableName using hudi + | tblproperties( + | primaryKey = 'id', + | type = 'cow', + | hoodie.compact.inline='true' Review Comment: @jinxing64 but how did the create table with `hoodie.compact.inline=true` call `HoodieSparkCopyOnWriteTable #scheduleCompaction` or `#compact`? ps: you can add my wechat(xleesf) to communicate offline ########## hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/TestCreateTable.scala: ########## @@ -763,4 +763,22 @@ class TestCreateTable extends HoodieSparkSqlTestBase { assertResult(true)(shown.contains("COMMENT 'This is a simple hudi table'")) } } + + test("Test CTAS using an illegal definition -- a COW table with compaction enabled.") { + val tableName = generateTableName + checkExceptionContain( + s""" + | create table $tableName using hudi + | tblproperties( + | primaryKey = 'id', + | type = 'cow', + | hoodie.compact.inline='true' Review Comment: @jinxing64 but how did the create table with `hoodie.compact.inline=true` call `HoodieSparkCopyOnWriteTable #scheduleCompaction` or `#compact`? ps: you can add my wechat(xleesf) to communicate offline -- 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-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org