openinx commented on a change in pull request #1346:
URL: https://github.com/apache/iceberg/pull/1346#discussion_r475317848



##########
File path: 
flink/src/main/java/org/apache/iceberg/flink/data/FlinkOrcReaders.java
##########
@@ -246,7 +256,7 @@ public void setBatchContext(long batchOffsetInFile) {
 
     StructReader(List<OrcValueReader<?>> readers, Types.StructType struct, 
Map<Integer, ?> idToConstant) {
       super(readers, struct, idToConstant);
-      this.numFields = readers.size();
+      this.numFields = struct.fields().size();

Review comment:
       Nice catch,  if the schema is a projected read schema,  then the 
`numFields` will be mismatched.




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to