the-other-tim-brown commented on code in PR #14017:
URL: https://github.com/apache/hudi/pull/14017#discussion_r2393083284
##########
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:
Could we move this check to `hasNext`? So we'd only call `hasNextInternal`
if `nextRecordLoaded` is false
##########
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:
Instead of adding a new functional test case here, should we just augment
the existing suite in `TestCDCDataFrameSuite`?
--
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]