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

    https://github.com/apache/drill/pull/673#discussion_r90694144
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/ParquetFixedWidthDictionaryReaders.java
 ---
    @@ -56,6 +58,31 @@ protected void readField(long recordsToReadInThisPass) {
         }
       }
     
    +  /**
    +   * This class uses for reading unsigned integer fields.
    +   */
    +  static class DictionaryUInt4Reader extends 
FixedByteAlignedReader<UInt4Vector> {
    +    DictionaryUInt4Reader(ParquetRecordReader parentReader, int 
allocateSize, ColumnDescriptor descriptor,
    +                        ColumnChunkMetaData columnChunkMetaData, boolean 
fixedLength, UInt4Vector v,
    +                        SchemaElement schemaElement) throws 
ExecutionSetupException {
    +      super(parentReader, allocateSize, descriptor, columnChunkMetaData, 
fixedLength, v, schemaElement);
    +    }
    +
    +    // this method is called by its superclass during a read loop
    +    @Override
    +    protected void readField(long recordsToReadInThisPass) {
    +
    +      recordsReadInThisIteration = Math.min(pageReader.currentPageCount
    +        - pageReader.valuesRead, recordsToReadInThisPass - 
valuesReadInCurrentPass);
    +
    +      if (usingDictionary) {
    +        for (int i = 0; i < recordsReadInThisIteration; i++){
    +          valueVec.getMutator().setSafe(valuesReadInCurrentPass + i, 
pageReader.dictionaryValueReader.readInteger());
    --- End diff --
    
    you probably need to set writer index just as you do in the uint8 case.


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