timsants commented on a change in pull request #6046:
URL: https://github.com/apache/incubator-pinot/pull/6046#discussion_r503035106



##########
File path: 
pinot-plugins/pinot-input-format/pinot-thrift/src/main/java/org/apache/pinot/plugin/inputformat/thrift/ThriftRecordReader.java
##########
@@ -61,12 +62,13 @@ public void init(File dataFile, Set<String> fieldsToRead, 
@Nullable RecordReader
     } catch (Exception e) {
       throw new RuntimeException(e);
     }
-    int index = 1;
-    TFieldIdEnum tFieldIdEnum;
-    while ((tFieldIdEnum = tObject.fieldForId(index)) != null) {
-      _fieldIds.put(tFieldIdEnum.getFieldName(), index);
-      index++;
+

Review comment:
       As discussed over Slack, there was a bug in how we were parsing Thrift 
fields. Thrift field IDs are not guaranteed to be consecutive, which was 
previous assumed. If a Thrift record did not have consecutive field IDs, the 
extractor would break/incorrectly extract values.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to