bvaradar commented on code in PR #8543:
URL: https://github.com/apache/hudi/pull/8543#discussion_r1175652747
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/TestCreateTable.scala:
##########
@@ -1065,4 +1065,21 @@ class TestCreateTable extends HoodieSparkSqlTestBase {
}
}
}
+
+ test("Test init HoodieCatalogTable class for non-Hudi table") {
+ val tableName = generateTableName
+ spark.sql(
+ s"""
+ | create table $tableName (
+ | id int,
+ | name string,
+ | price double,
+ | ts long
+ | ) using parquet
+ """.stripMargin)
+ val exception = intercept[IllegalArgumentException] {
+ spark.sql(s"""call show_commits(table => '$tableName', limit =>
10)""").collect()
+ }
+ assert(exception.getMessage.contains(s"""$tableName is not a Hudi
table"""))
Review Comment:
use assertTrue
--
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]