YannByron commented on code in PR #3307:
URL: https://github.com/apache/paimon/pull/3307#discussion_r1597348460
##########
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/PaimonRecordReaderIterator.scala:
##########
@@ -84,7 +95,18 @@ case class PaimonRecordReaderIterator(reader:
RecordReader[PaimonInternalRow])
try {
var stop = false
while (!stop) {
- currentResult = currentIterator.next
+ val dataRow = currentIterator.next()
+ if (dataRow != null) {
+ if (needMetadata && isFileRecordIterator) {
+
updateMetadataRow(currentIterator.asInstanceOf[FileRecordIterator[PaimonInternalRow]])
+ currentResult = joinedRow.replace(dataRow, metadataRow)
+ } else {
+ currentResult = dataRow
Review Comment:
I prefer to return null instead of throwing exception.
--
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]