linliu-code commented on code in PR #9593:
URL: https://github.com/apache/hudi/pull/9593#discussion_r1316152418
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/Iterators.scala:
##########
@@ -116,16 +116,16 @@ class LogFileIterator(logFiles: List[HoodieLogFile],
// NOTE: This have to stay lazy to make sure it's initialized only at the
point where it's
// going to be used, since we modify `logRecords` before that and
therefore can't do it any earlier
- private lazy val logRecordsIterator: Iterator[Option[HoodieRecord[_]]] =
+ private lazy val logRecordsIterator: Iterator[scala.Option[HoodieRecord[_]]]
=
logRecords.iterator.map {
- case (_, record: HoodieSparkRecord) => Option(record)
- case (_, _: HoodieEmptyRecord[_]) => Option.empty
+ case (_, record: HoodieSparkRecord) => scala.Option(record)
+ case (_, _: HoodieEmptyRecord[_]) => scala.Option.empty
case (_, record) =>
toScalaOption(record.toIndexedRecord(logFileReaderAvroSchema,
payloadProps))
}
- protected def removeLogRecord(key: String): Option[HoodieRecord[_]] =
logRecords.remove(key)
+ protected def removeLogRecord(key: String): scala.Option[HoodieRecord[_]] =
logRecords.remove(key)
protected def doHasNext: Boolean = hasNextInternal
Review Comment:
Hi @beyond1920, not quiet understand why we need to use merge here since the
function tends to remove the record. Can you explain a bit?
--
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]