hawq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kuien <...@git.apache.org>
Subject [GitHub] hawq pull request #1397: HAWQ-1660. Optimize parquet scan when bloom filter ...
Date Fri, 21 Sep 2018 09:03:56 GMT
Github user kuien commented on a diff in the pull request:

    https://github.com/apache/hawq/pull/1397#discussion_r219430232
  
    --- Diff: src/backend/cdb/cdbparquetrowgroup.c ---
    @@ -322,6 +306,92 @@ ParquetRowGroupReader_ScanNextTuple(
     	return false;
     }
     
    +/*
    + * Get specified attributes of a tuple from current row group into slot.
    + */
    +void
    +ParquetRowGroupReader_ScanNextTupleColumns(
    +	TupleDesc 				tupDesc,
    +	ParquetRowGroupReader	*rowGroupReader,
    +	int						*hawqAttrToParquetColNum,
    +	bool 					*projs,
    +	TupleTableSlot 			*slot,
    +	List					*attsList)
    +{
    +	int natts = slot->tts_tupleDescriptor->natts;
    +	Assert(natts <= tupDesc->natts);
    +
    +	Datum *values = slot_get_values(slot);
    +	bool *nulls = slot_get_isnull(slot);
    +
    +	int colReaderIndex = 0;
    +	for(int i = 0; i < natts; i++)
    +	{
    +		/* it is not expensive to do twice in case of bloomfilter */
    +		if(projs[i] == false)
    +		{
    +			nulls[i] = true;
    +			continue;
    +		}
    +
    +		/* skip those attributes not in given list */
    +		if (attsList != NIL && list_find_int(attsList, i) >= 0)
    --- End diff --
    
    typo, should be < 0


---

Mime
View raw message