cxzl25 commented on code in PR #8668:
URL: https://github.com/apache/hudi/pull/8668#discussion_r1204049140
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieMergeOnReadRDD.scala:
##########
@@ -116,7 +125,45 @@ class HoodieMergeOnReadRDD(@transient sc: SparkContext,
Option(TaskContext.get()).foreach(_.addTaskCompletionListener[Unit](_ =>
iter.asInstanceOf[Closeable].close()))
}
- iter
+ val commitTimeMetadataFieldIdx =
requiredSchema.structTypeSchema.fieldNames.indexOf(HoodieRecord.COMMIT_TIME_METADATA_FIELD)
+ val needsFiltering = commitTimeMetadataFieldIdx >= 0 &&
!StringUtils.isNullOrEmpty(startTimestamp) &&
!StringUtils.isNullOrEmpty(endTimestamp)
Review Comment:
The `_hoodie_commit_time` field is now mandatory only for
`MergeOnReadIncrementalRelation`.
Queries of other table types do not use the parquet record filter function.
https://github.com/apache/hudi/blob/9d58ee4b1f1fce213ee3f4ff478eb003da943924/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/MergeOnReadIncrementalRelation.scala#L200-L205
--
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]