You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2019/10/15 20:22:48 UTC

[GitHub] [incubator-hudi] umehrot2 commented on a change in pull request #956: [HUDI-298] Fix issue with incorrect column mapping casusing bad data, during on-the-fly merge of Real Time tables

umehrot2 commented on a change in pull request #956: [HUDI-298] Fix issue with incorrect column mapping casusing bad data, during on-the-fly merge of Real Time tables
URL: https://github.com/apache/incubator-hudi/pull/956#discussion_r335158067
 
 

 ##########
 File path: hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/realtime/AbstractRealtimeRecordReader.java
 ##########
 @@ -209,6 +209,11 @@ public static Schema generateProjectionSchema(Schema writeSchema, List<String> f
     return projectedSchema;
   }
 
+  public static Map<String, Field> getNameToFieldMap(Schema schema) {
+    return schema.getFields().stream().map(r -> Pair.of(r.name().toLowerCase(), r))
 
 Review comment:
   Yep looks like Avro is case sensitive. https://avro.apache.org/docs/1.8.2/spec.html#names
   
   Possibly thats also the reason why this code was doing `lowercase` conversion in the first place: 
   
   https://github.com/apache/incubator-hudi/blob/master/hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/realtime/AbstractRealtimeRecordReader.java#L195

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services