wzx140 commented on code in PR #7714:
URL: https://github.com/apache/hudi/pull/7714#discussion_r1082263118
##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/block/HoodieAvroDataBlock.java:
##########
@@ -192,16 +198,25 @@ public boolean hasNext() {
}
@Override
- public IndexedRecord next() {
+ public HoodieRecord next() {
try {
int recordLength = this.dis.readInt();
BinaryDecoder decoder =
DecoderFactory.get().binaryDecoder(this.content,
this.dis.getNumberOfBytesRead(),
recordLength, this.decoderCache.get());
this.decoderCache.set(decoder);
- IndexedRecord record = this.reader.read(null, decoder);
+ IndexedRecord indexedRecord = this.reader.read(null, decoder);
this.dis.skipBytes(recordLength);
this.readRecords++;
- return record;
+ if (recordType == HoodieRecordType.SPARK) {
Review Comment:
Do you mean that we should move the logic of reading avro data into
HoodieAvroReader and HoodieSparkAvroReader? And we create these readers from
HoodieFileReaderFactory. Just like usage of FileReader in
HoodieParquetDataBlock.
--
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]