hawq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From linwen <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request #1350: HAWQ-1600. Parquet table data vectorized ...
Date Mon, 02 Apr 2018 03:59:32 GMT
Github user linwen commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1350#discussion_r178483545
  
    --- Diff: contrib/vexecutor/ao_reader.c ---
    @@ -0,0 +1,78 @@
    +#include "ao_reader.h"
    +#include "tuplebatch.h"
    +#include "utils/datum.h"
    +
    +
    +void
    +BeginVScanAppendOnlyRelation(ScanState *scanState)
    +{
    +    BeginScanAppendOnlyRelation(scanState);
    +    VectorizedState* vs = (VectorizedState*)scanState->ps.vectorized;
    +    TupleBatch tb = scanState->ss_ScanTupleSlot->PRIVATE_tb;
    +    vs->proj = palloc0(sizeof(bool) * tb->ncols);
    +    GetNeededColumnsForScan((Node* )scanState->ps.plan->targetlist,vs->proj,tb->ncols);
    +    GetNeededColumnsForScan((Node* )scanState->ps.plan->qual,vs->proj,tb->ncols);
    +
    +}
    +
    +void
    +EndVScanAppendOnlyRelation(ScanState *scanState)
    +{
    +    VectorizedState* vs = (VectorizedState*)scanState->ps.vectorized;
    +    pfree(vs->proj);
    +    EndScanAppendOnlyRelation(scanState);
    +}
    +
    +TupleTableSlot *
    +AppendOnlyVScanNext(ScanState *scanState)
    +{
    +    TupleTableSlot *slot = scanState->ss_ScanTupleSlot;
    +    TupleBatch tb = (TupleBatch)slot->PRIVATE_tb;
    +    TupleDesc td = scanState->ss_ScanTupleSlot->tts_tupleDescriptor;
    +    VectorizedState* vs = scanState->ps.vectorized;
    +    int row = 0;
    +
    +    for(;row < tb->batchsize;row ++)
    +    {
    +        AppendOnlyScanNext(scanState);
    +
    +        slot = scanState->ss_ScanTupleSlot;
    +        if(TupIsNull(slot))
    +            break;
    +
    +        for(int i = 0;i < tb->ncols ; i ++)
    +        {
    +
    +           if(vs->proj[i])
    +            {
    --- End diff --
    
    redundant space here


---

Mime
View raw message