Github user daveoshinsky commented on a diff in the pull request:
https://github.com/apache/drill/pull/372#discussion_r55148322
--- 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 --
It took me a while to get some idea how this code is supposed to work. It
was not clear to me that only the last item in the list was accessed. If you
are certain that is the case, we don't need a list, but instead just a single
value.
---
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.
---