yihua commented on code in PR #14017:
URL: https://github.com/apache/hudi/pull/14017#discussion_r2395209959


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/dml/others/TestHoodieTableValuedFunction.scala:
##########
@@ -688,4 +688,110 @@ class TestHoodieTableValuedFunction extends 
HoodieSparkSqlTestBase {
     }
     spark.sessionState.conf.unsetConf(SPARK_SQL_INSERT_INTO_OPERATION.key)
   }
+
+  test("Test hudi_table_changes cdc ordering issue") {

Review Comment:
   +1 we can add validation of CDC query with `order by` clause as part of 
other tests.



##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/cdc/CDCFileGroupIterator.scala:
##########
@@ -221,38 +223,43 @@ class CDCFileGroupIterator(split: HoodieCDCFileGroupSplit,
   }
 
   @tailrec final def hasNextInternal: Boolean = {
-    if (needLoadNextFile) {
-      loadCdcFile()
-    }
-    if (currentCDCFileSplit == null) {
-      false
+    if (nextRecordLoaded) {

Review Comment:
   +1



-- 
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]

Reply via email to