vamsikarnika commented on code in PR #17460:
URL: https://github.com/apache/hudi/pull/17460#discussion_r2602605304
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/ddl/TestAlterTableDropPartition.scala:
##########
@@ -552,9 +552,12 @@ class TestAlterTableDropPartition extends
HoodieSparkSqlTestBase {
// Generate the first clustering plan
val firstScheduleInstant =
client.scheduleClustering(HOption.empty()).get()
- checkAnswer(s"call show_clustering('$tableName')")(
- Seq(firstScheduleInstant, 3, HoodieInstant.State.REQUESTED.name(),
"*")
- )
+ val showClusteringResults = spark.sql(s"call
show_clustering('$tableName')").collect()
+ assertResult(3)(showClusteringResults.length)
+ showClusteringResults.foreach { row =>
+ assertResult(HoodieInstant.State.REQUESTED.name())(row.getString(2))
+ assertResult(3)(row.getInt(5))
+ }
Review Comment:
Can we also add validations for partition paths here?
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/ddl/TestAlterTableDropPartition.scala:
##########
@@ -600,9 +603,8 @@ class TestAlterTableDropPartition extends
HoodieSparkSqlTestBase {
val firstScheduleInstant = client.scheduleCompaction(HOption.empty())
assertTrue(firstScheduleInstant.isPresent)
- checkAnswer(s"call show_compaction('$tableName')")(
- Seq(firstScheduleInstant.get(), 5,
HoodieInstant.State.REQUESTED.name())
- )
+ val showCompactionResults = spark.sql(s"call
show_compaction('$tableName')").collect()
+ assertResult(5)(showCompactionResults.length)
Review Comment:
same here
--
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]