提交 484d043b 编写于 作者: H Haojun Liao

fix(query):filter invisible columns

上级 f3d7d667
......@@ -1237,7 +1237,7 @@ static SSDataBlock* doDropInvisibleCol(SSDataBlock* pBlock, SArray* pColMatchInf
}
}
SSDataBlock* pRes = createOneDataBlock(pBlock, false);
SSDataBlock* pRes = createOneDataBlock(pBlock, true);
if (ignoreCols) {
int32_t i = 0;
while(i < taosArrayGetSize(pRes->pDataBlock)) {
......@@ -1255,10 +1255,11 @@ static SSDataBlock* doDropInvisibleCol(SSDataBlock* pBlock, SArray* pColMatchInf
}
}
pRes->info.rows = pBlock->info.rows;
return pRes;
}
static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
static SSDataBlock* doStreamScanImpl(SOperatorInfo* pOperator) {
// NOTE: this operator does never check if current status is done or not
SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
SStreamScanInfo* pInfo = pOperator->info;
......@@ -1470,7 +1471,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
}
qDebug("scan rows: %d", pBlockInfo->rows);
return (pBlockInfo->rows == 0) ? NULL : doDropInvisibleCol(pInfo->pRes, pInfo->pColMatchInfo);
return (pBlockInfo->rows == 0) ? NULL : pInfo->pRes;
} else {
ASSERT(0);
......@@ -1478,6 +1479,16 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
}
}
static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
SSDataBlock* pBlock = doStreamScanImpl(pOperator);
if (pBlock != NULL) {
SStreamScanInfo* pInfo = (SStreamScanInfo*) pOperator->info;
return doDropInvisibleCol(pInfo->pRes, pInfo->pColMatchInfo);
} else {
return NULL;
}
}
static SSDataBlock* doRawScan(SOperatorInfo* pInfo) {
//
return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册