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


##########
hudi-flink-datasource/hudi-flink1.13.x/src/main/java/org/apache/hudi/table/format/cow/vector/reader/RowColumnReader.java:
##########
@@ -44,7 +44,12 @@ public void readToVector(int readNumber, 
WritableColumnVector vector) throws IOE
     // row vector null array
     boolean[] isNulls = new boolean[readNumber];
     for (int i = 0; i < vectors.length; i++) {
-      fieldReaders.get(i).readToVector(readNumber, vectors[i]);
+      // schema evolution: read the file with a new extended field name.
+      if (fieldReaders.get(i) == null) {
+        vectors[i].fillWithNulls();
+      } else {

Review Comment:
   Hmmm, I don't understand what you mean by this. If the `fieldReader.get(i)` 
returns a null, it means that this column does not exist in the parquet file. 
   
   As such, there is nothing to read from file.
   
   Do you mean `fieldVector` should never be null now? If that's the case, 
given the above assumption, if the field is a newly added field and the parquet 
hasn't been updated, it should be null right?
   
   I am not sure if i am understanding your question correctly. Sorry.



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