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


##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HiveHoodieReaderContext.java:
##########
@@ -181,14 +200,14 @@ public Option<HoodieRecordMerger> 
getRecordMerger(RecordMergeMode mergeMode, Str
 
   @Override
   public ClosableIterator<ArrayWritable> 
mergeBootstrapReaders(ClosableIterator<ArrayWritable> skeletonFileIterator,
-                                                               Schema 
skeletonRequiredSchema,
+                                                               HoodieSchema 
skeletonRequiredSchema,
                                                                
ClosableIterator<ArrayWritable> dataFileIterator,
-                                                               Schema 
dataRequiredSchema,
+                                                               HoodieSchema 
dataRequiredSchema,
                                                                
List<Pair<String, Object>> partitionFieldsAndValues) {
     int skeletonLen = skeletonRequiredSchema.getFields().size();
     int dataLen = dataRequiredSchema.getFields().size();
     int[] partitionFieldPositions = partitionFieldsAndValues.stream()
-        .map(pair -> 
dataRequiredSchema.getField(pair.getKey()).pos()).mapToInt(Integer::intValue).toArray();
+        .map(pair -> 
dataRequiredSchema.getField(pair.getKey()).get().pos()).mapToInt(Integer::intValue).toArray();

Review Comment:
   Added:
   ```java
   new HoodieSchemaException("Partition field '" + pair.getKey() + "' not found 
in data required schema")
   ```
   
   `HoodieSchemaException` is in the `org.apache.hudi.internal.schema` package
   



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