Github user jaltekruse commented on a diff in the pull request:

    https://github.com/apache/drill/pull/372#discussion_r55125267
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/NullableVarLengthValuesColumn.java
 ---
    @@ -69,11 +73,16 @@ protected boolean readAndStoreValueSizeInformation() 
throws IOException {
         if ( currDefLevel == -1 ) {
           currDefLevel = pageReader.definitionLevels.readInteger();
         }
    -    if ( columnDescriptor.getMaxDefinitionLevel() > currDefLevel) {
    +
    +    if (columnDescriptor.getMaxDefinitionLevel() > currDefLevel) {
           nullsRead++;
    -      // set length of zero, each index in the vector defaults to null so 
no need to set the nullability
    -      variableWidthVector.getMutator().setValueLengthSafe(
    -          valuesReadInCurrentPass + pageReader.valuesReadyToRead, 0);
    +      // set length of zero, each index in the vector defaults to null so 
no
    +      // need to set the nullability
    +      if (variableWidthVector == null) {
    --- End diff --
    
    I know this class hierarchy is a bit messy as is ( I am the original author 
of most if it, I should go back to clean it up). But we shouldn't be using the 
presence or absence of this field as a flag to know which class we are in.
    
    I'm 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to