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

    https://github.com/apache/incubator-hawq/pull/1360#discussion_r186348737
  
    --- Diff: src/backend/cdb/cdbparquetrowgroup.c ---
    @@ -206,54 +207,54 @@ ParquetRowGroupReader_ScanNextTuple(
        ParquetRowGroupReader   *rowGroupReader,
        int                                             
*hawqAttrToParquetColNum,
        bool                                    *projs,
    +   RuntimeFilterState              *rfState,
        TupleTableSlot                  *slot)
     {
        Assert(slot);
    -
    -   if (rowGroupReader->rowRead >= rowGroupReader->rowCount)
    +   while (rowGroupReader->rowRead < rowGroupReader->rowCount)
        {
    -           ParquetRowGroupReader_FinishedScanRowGroup(rowGroupReader);
    -           return false;
    -   }
    -
    -   /*
    -    * get the next item (tuple) from the row group
    -    */
    -   rowGroupReader->rowRead++;
     
    -   int natts = slot->tts_tupleDescriptor->natts;
    -   Assert(natts <= tupDesc->natts);
    -
    -   Datum *values = slot_get_values(slot);
    -   bool *nulls = slot_get_isnull(slot);
    +           /*
    +            * get the next item (tuple) from the row group
    +            */
    +           rowGroupReader->rowRead++;
     
    -   int colReaderIndex = 0;
    -   for(int i = 0; i < natts; i++)
    -   {
    -           if(projs[i] == false)
    -           {
    -                   nulls[i] = true;
    -                   continue;
    -           }
    +           int natts = slot->tts_tupleDescriptor->natts;
    +           Assert(natts <= tupDesc->natts);
     
    -           ParquetColumnReader *nextReader =
    -                   &rowGroupReader->columnReaders[colReaderIndex];
    -           int hawqTypeID = tupDesc->attrs[i]->atttypid;
    +           Datum *values = slot_get_values(slot);
    +           bool *nulls = slot_get_isnull(slot);
     
    -           if(hawqAttrToParquetColNum[i] == 1)
    +           int colReaderIndex = 0;
    +           int16 proj[128];
    --- End diff --
    
    It's better to use natts instead of 128.


---

Reply via email to