voonhous commented on code in PR #17763:
URL: https://github.com/apache/hudi/pull/17763#discussion_r2656079556


##########
hudi-hadoop-common/src/main/java/org/apache/hudi/io/hadoop/OrcReaderIterator.java:
##########
@@ -40,22 +40,22 @@
 public class OrcReaderIterator<T> implements ClosableIterator<T> {
 
   private final RecordReader recordReader;
-  private final Schema avroSchema;
+  private final HoodieSchema schema;
   private final List<String> fieldNames;
   private final List<TypeDescription> orcFieldTypes;
-  private final Schema[] avroFieldSchemas;
+  private final HoodieSchema[] fieldSchemas;
   private final VectorizedRowBatch batch;
   private int rowInBatch;
   private T next;
 
-  public OrcReaderIterator(RecordReader recordReader, Schema schema, 
TypeDescription orcSchema) {
+  public OrcReaderIterator(RecordReader recordReader, HoodieSchema schema, 
TypeDescription orcSchema) {
     this.recordReader = recordReader;
-    this.avroSchema = schema;
+    this.schema = schema;
     this.fieldNames = orcSchema.getFieldNames();
     this.orcFieldTypes = orcSchema.getChildren();
-    this.avroFieldSchemas = fieldNames.stream()
-        .map(fieldName -> avroSchema.getField(fieldName).schema())
-        .toArray(Schema[]::new);
+    this.fieldSchemas = fieldNames.stream()
+        .map(fieldName -> this.schema.getField(fieldName).get().schema())

Review Comment:
   Addressed.



-- 
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]

Reply via email to