Merge pull request #14746 from taosdata/feature/3_liaohj
fix(query): handle the indefinit function output with partition by
This commit is contained in:
commit
75ace4f4ed
|
@ -323,11 +323,9 @@ static bool filesetIteratorNext(SFilesetIter* pIter, STsdbReader* pReader) {
|
||||||
|
|
||||||
if ((asc && (win.ekey < pReader->window.skey)) || ((!asc) && (win.skey > pReader->window.ekey))) {
|
if ((asc && (win.ekey < pReader->window.skey)) || ((!asc) && (win.skey > pReader->window.ekey))) {
|
||||||
pIter->index += step;
|
pIter->index += step;
|
||||||
|
|
||||||
if ((asc && pIter->index >= pIter->numOfFiles) || ((!asc) && pIter->index < 0)) {
|
if ((asc && pIter->index >= pIter->numOfFiles) || ((!asc) && pIter->index < 0)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -540,6 +540,9 @@ typedef struct SIndefOperatorInfo {
|
||||||
SArray* pPseudoColInfo;
|
SArray* pPseudoColInfo;
|
||||||
SExprSupp scalarSup;
|
SExprSupp scalarSup;
|
||||||
SNode* pCondition;
|
SNode* pCondition;
|
||||||
|
uint64_t groupId;
|
||||||
|
|
||||||
|
SSDataBlock* pNextGroupRes;
|
||||||
} SIndefOperatorInfo;
|
} SIndefOperatorInfo;
|
||||||
|
|
||||||
typedef struct SFillOperatorInfo {
|
typedef struct SFillOperatorInfo {
|
||||||
|
|
|
@ -571,8 +571,8 @@ int32_t projectApplyFunctions(SExprInfo* pExpr, SSDataBlock* pResult, SSDataBloc
|
||||||
setPseudoOutputColInfo(pResult, pCtx, pPseudoList);
|
setPseudoOutputColInfo(pResult, pCtx, pPseudoList);
|
||||||
pResult->info.groupId = pSrcBlock->info.groupId;
|
pResult->info.groupId = pSrcBlock->info.groupId;
|
||||||
|
|
||||||
// if the source equals to the destination, it is to create a new column as the result of scalar function or some
|
// if the source equals to the destination, it is to create a new column as the result of scalar
|
||||||
// operators.
|
// function or some operators.
|
||||||
bool createNewColModel = (pResult == pSrcBlock);
|
bool createNewColModel = (pResult == pSrcBlock);
|
||||||
|
|
||||||
int32_t numOfRows = 0;
|
int32_t numOfRows = 0;
|
||||||
|
@ -580,17 +580,17 @@ int32_t projectApplyFunctions(SExprInfo* pExpr, SSDataBlock* pResult, SSDataBloc
|
||||||
for (int32_t k = 0; k < numOfOutput; ++k) {
|
for (int32_t k = 0; k < numOfOutput; ++k) {
|
||||||
int32_t outputSlotId = pExpr[k].base.resSchema.slotId;
|
int32_t outputSlotId = pExpr[k].base.resSchema.slotId;
|
||||||
SqlFunctionCtx* pfCtx = &pCtx[k];
|
SqlFunctionCtx* pfCtx = &pCtx[k];
|
||||||
|
SInputColumnInfoData* pInputData = &pfCtx->input;
|
||||||
|
|
||||||
if (pExpr[k].pExpr->nodeType == QUERY_NODE_COLUMN) { // it is a project query
|
if (pExpr[k].pExpr->nodeType == QUERY_NODE_COLUMN) { // it is a project query
|
||||||
SColumnInfoData* pColInfoData = taosArrayGet(pResult->pDataBlock, outputSlotId);
|
SColumnInfoData* pColInfoData = taosArrayGet(pResult->pDataBlock, outputSlotId);
|
||||||
if (pResult->info.rows > 0 && !createNewColModel) {
|
if (pResult->info.rows > 0 && !createNewColModel) {
|
||||||
colDataMergeCol(pColInfoData, pResult->info.rows, &pResult->info.capacity, pfCtx->input.pData[0],
|
colDataMergeCol(pColInfoData, pResult->info.rows, &pResult->info.capacity, pInputData->pData[0], pInputData->numOfRows);
|
||||||
pfCtx->input.numOfRows);
|
|
||||||
} else {
|
} else {
|
||||||
colDataAssign(pColInfoData, pfCtx->input.pData[0], pfCtx->input.numOfRows, &pResult->info);
|
colDataAssign(pColInfoData, pInputData->pData[0], pInputData->numOfRows, &pResult->info);
|
||||||
}
|
}
|
||||||
|
|
||||||
numOfRows = pfCtx->input.numOfRows;
|
numOfRows = pInputData->numOfRows;
|
||||||
} else if (pExpr[k].pExpr->nodeType == QUERY_NODE_VALUE) {
|
} else if (pExpr[k].pExpr->nodeType == QUERY_NODE_VALUE) {
|
||||||
SColumnInfoData* pColInfoData = taosArrayGet(pResult->pDataBlock, outputSlotId);
|
SColumnInfoData* pColInfoData = taosArrayGet(pResult->pDataBlock, outputSlotId);
|
||||||
|
|
||||||
|
@ -623,14 +623,12 @@ int32_t projectApplyFunctions(SExprInfo* pExpr, SSDataBlock* pResult, SSDataBloc
|
||||||
numOfRows = dest.numOfRows;
|
numOfRows = dest.numOfRows;
|
||||||
taosArrayDestroy(pBlockList);
|
taosArrayDestroy(pBlockList);
|
||||||
} else if (pExpr[k].pExpr->nodeType == QUERY_NODE_FUNCTION) {
|
} else if (pExpr[k].pExpr->nodeType == QUERY_NODE_FUNCTION) {
|
||||||
ASSERT(!fmIsAggFunc(pfCtx->functionId));
|
|
||||||
|
|
||||||
// _rowts/_c0, not tbname column
|
// _rowts/_c0, not tbname column
|
||||||
if (fmIsPseudoColumnFunc(pfCtx->functionId) && (!fmIsScanPseudoColumnFunc(pfCtx->functionId))) {
|
if (fmIsPseudoColumnFunc(pfCtx->functionId) && (!fmIsScanPseudoColumnFunc(pfCtx->functionId))) {
|
||||||
// do nothing
|
// do nothing
|
||||||
} else if (fmIsIndefiniteRowsFunc(pfCtx->functionId)) {
|
} else if (fmIsIndefiniteRowsFunc(pfCtx->functionId)) {
|
||||||
SResultRowEntryInfo* pResInfo = GET_RES_INFO(&pCtx[k]);
|
SResultRowEntryInfo* pResInfo = GET_RES_INFO(pfCtx);
|
||||||
pfCtx->fpSet.init(&pCtx[k], pResInfo);
|
pfCtx->fpSet.init(pfCtx, pResInfo);
|
||||||
|
|
||||||
pfCtx->pOutput = taosArrayGet(pResult->pDataBlock, outputSlotId);
|
pfCtx->pOutput = taosArrayGet(pResult->pDataBlock, outputSlotId);
|
||||||
pfCtx->offset = createNewColModel ? 0 : pResult->info.rows; // set the start offset
|
pfCtx->offset = createNewColModel ? 0 : pResult->info.rows; // set the start offset
|
||||||
|
@ -642,6 +640,23 @@ int32_t projectApplyFunctions(SExprInfo* pExpr, SSDataBlock* pResult, SSDataBloc
|
||||||
}
|
}
|
||||||
|
|
||||||
numOfRows = pfCtx->fpSet.process(pfCtx);
|
numOfRows = pfCtx->fpSet.process(pfCtx);
|
||||||
|
} else if (fmIsAggFunc(pfCtx->functionId)) {
|
||||||
|
// _group_key function for "partition by tbname" + csum(col_name) query
|
||||||
|
SColumnInfoData* pOutput = taosArrayGet(pResult->pDataBlock, outputSlotId);
|
||||||
|
int32_t slotId = pfCtx->param[0].pCol->slotId;
|
||||||
|
|
||||||
|
// todo handle the json tag
|
||||||
|
SColumnInfoData* pInput = taosArrayGet(pSrcBlock->pDataBlock, slotId);
|
||||||
|
for(int32_t f = 0; f < pSrcBlock->info.rows; ++f) {
|
||||||
|
bool isNull = colDataIsNull_s(pInput, f);
|
||||||
|
if (isNull) {
|
||||||
|
colDataAppendNULL(pOutput, pResult->info.rows + f);
|
||||||
|
} else {
|
||||||
|
char* data = colDataGetData(pInput, f);
|
||||||
|
colDataAppend(pOutput, pResult->info.rows + f, data, isNull);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
SArray* pBlockList = taosArrayInit(4, POINTER_BYTES);
|
SArray* pBlockList = taosArrayInit(4, POINTER_BYTES);
|
||||||
taosArrayPush(pBlockList, &pSrcBlock);
|
taosArrayPush(pBlockList, &pSrcBlock);
|
||||||
|
@ -675,25 +690,6 @@ int32_t projectApplyFunctions(SExprInfo* pExpr, SSDataBlock* pResult, SSDataBloc
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setResultRowKey(SResultRow* pResultRow, char* pData, int16_t type) {
|
|
||||||
if (IS_VAR_DATA_TYPE(type)) {
|
|
||||||
// todo disable this
|
|
||||||
|
|
||||||
// if (pResultRow->key == NULL) {
|
|
||||||
// pResultRow->key = taosMemoryMalloc(varDataTLen(pData));
|
|
||||||
// varDataCopy(pResultRow->key, pData);
|
|
||||||
// } else {
|
|
||||||
// ASSERT(memcmp(pResultRow->key, pData, varDataTLen(pData)) == 0);
|
|
||||||
// }
|
|
||||||
} else {
|
|
||||||
int64_t v = -1;
|
|
||||||
GET_TYPED_DATA(v, int64_t, type, pData);
|
|
||||||
|
|
||||||
pResultRow->win.skey = v;
|
|
||||||
pResultRow->win.ekey = v;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool functionNeedToExecute(SqlFunctionCtx* pCtx) {
|
bool functionNeedToExecute(SqlFunctionCtx* pCtx) {
|
||||||
struct SResultRowEntryInfo* pResInfo = GET_RES_INFO(pCtx);
|
struct SResultRowEntryInfo* pResInfo = GET_RES_INFO(pCtx);
|
||||||
|
|
||||||
|
@ -3825,39 +3821,16 @@ _error:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SSDataBlock* doApplyIndefinitFunction(SOperatorInfo* pOperator) {
|
static void doHandleDataBlock(SOperatorInfo* pOperator, SSDataBlock* pBlock, SOperatorInfo* downstream, SExecTaskInfo* pTaskInfo) {
|
||||||
|
int32_t order = 0;
|
||||||
|
int32_t scanFlag = 0;
|
||||||
|
|
||||||
SIndefOperatorInfo* pIndefInfo = pOperator->info;
|
SIndefOperatorInfo* pIndefInfo = pOperator->info;
|
||||||
SOptrBasicInfo* pInfo = &pIndefInfo->binfo;
|
SOptrBasicInfo* pInfo = &pIndefInfo->binfo;
|
||||||
SExprSupp* pSup = &pOperator->exprSupp;
|
SExprSupp* pSup = &pOperator->exprSupp;
|
||||||
|
|
||||||
SSDataBlock* pRes = pInfo->pRes;
|
|
||||||
blockDataCleanup(pRes);
|
|
||||||
|
|
||||||
SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
|
|
||||||
if (pOperator->status == OP_EXEC_DONE) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
int64_t st = 0;
|
|
||||||
int32_t order = 0;
|
|
||||||
int32_t scanFlag = 0;
|
|
||||||
|
|
||||||
if (pOperator->cost.openCost == 0) {
|
|
||||||
st = taosGetTimestampUs();
|
|
||||||
}
|
|
||||||
|
|
||||||
SOperatorInfo* downstream = pOperator->pDownstream[0];
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
// The downstream exec may change the value of the newgroup, so use a local variable instead.
|
|
||||||
SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream);
|
|
||||||
if (pBlock == NULL) {
|
|
||||||
doSetOperatorCompleted(pOperator);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// the pDataBlock are always the same one, no need to call this again
|
// the pDataBlock are always the same one, no need to call this again
|
||||||
int32_t code = getTableScanInfo(pOperator->pDownstream[0], &order, &scanFlag);
|
int32_t code = getTableScanInfo(downstream, &order, &scanFlag);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
longjmp(pTaskInfo->env, code);
|
longjmp(pTaskInfo->env, code);
|
||||||
}
|
}
|
||||||
|
@ -3875,14 +3848,81 @@ static SSDataBlock* doApplyIndefinitFunction(SOperatorInfo* pOperator) {
|
||||||
setInputDataBlock(pOperator, pSup->pCtx, pBlock, order, scanFlag, false);
|
setInputDataBlock(pOperator, pSup->pCtx, pBlock, order, scanFlag, false);
|
||||||
blockDataEnsureCapacity(pInfo->pRes, pInfo->pRes->info.rows + pBlock->info.rows);
|
blockDataEnsureCapacity(pInfo->pRes, pInfo->pRes->info.rows + pBlock->info.rows);
|
||||||
|
|
||||||
code = projectApplyFunctions(pOperator->exprSupp.pExprInfo, pInfo->pRes, pBlock, pSup->pCtx,
|
code = projectApplyFunctions(pSup->pExprInfo, pInfo->pRes, pBlock, pSup->pCtx, pSup->numOfExprs,
|
||||||
pOperator->exprSupp.numOfExprs, pIndefInfo->pPseudoColInfo);
|
pIndefInfo->pPseudoColInfo);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
longjmp(pTaskInfo->env, code);
|
longjmp(pTaskInfo->env, code);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static SSDataBlock* doApplyIndefinitFunction(SOperatorInfo* pOperator) {
|
||||||
|
SIndefOperatorInfo* pIndefInfo = pOperator->info;
|
||||||
|
SOptrBasicInfo* pInfo = &pIndefInfo->binfo;
|
||||||
|
SExprSupp* pSup = &pOperator->exprSupp;
|
||||||
|
|
||||||
|
SSDataBlock* pRes = pInfo->pRes;
|
||||||
|
blockDataCleanup(pRes);
|
||||||
|
|
||||||
|
SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
|
||||||
|
if (pOperator->status == OP_EXEC_DONE) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int64_t st = 0;
|
||||||
|
|
||||||
|
if (pOperator->cost.openCost == 0) {
|
||||||
|
st = taosGetTimestampUs();
|
||||||
|
}
|
||||||
|
|
||||||
|
SOperatorInfo* downstream = pOperator->pDownstream[0];
|
||||||
|
|
||||||
|
while(1) {
|
||||||
|
// here we need to handle the existsed group results
|
||||||
|
if (pIndefInfo->pNextGroupRes != NULL) { // todo extract method
|
||||||
|
for (int32_t k = 0; k < pSup->numOfExprs; ++k) {
|
||||||
|
SqlFunctionCtx* pCtx = &pSup->pCtx[k];
|
||||||
|
|
||||||
|
SResultRowEntryInfo* pResInfo = GET_RES_INFO(pCtx);
|
||||||
|
pResInfo->initialized = false;
|
||||||
|
pCtx->pOutput = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
doHandleDataBlock(pOperator, pIndefInfo->pNextGroupRes, downstream, pTaskInfo);
|
||||||
|
pIndefInfo->pNextGroupRes = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pInfo->pRes->info.rows < pOperator->resultInfo.threshold) {
|
||||||
|
while (1) {
|
||||||
|
// The downstream exec may change the value of the newgroup, so use a local variable instead.
|
||||||
|
SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream);
|
||||||
|
if (pBlock == NULL) {
|
||||||
|
doSetOperatorCompleted(pOperator);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pIndefInfo->groupId == 0 && pBlock->info.groupId != 0) {
|
||||||
|
pIndefInfo->groupId = pBlock->info.groupId; // this is the initial group result
|
||||||
|
} else {
|
||||||
|
if (pIndefInfo->groupId != pBlock->info.groupId) { // reset output buffer and computing status
|
||||||
|
pIndefInfo->groupId = pBlock->info.groupId;
|
||||||
|
pIndefInfo->pNextGroupRes = pBlock;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
doHandleDataBlock(pOperator, pBlock, downstream, pTaskInfo);
|
||||||
|
if (pInfo->pRes->info.rows >= pOperator->resultInfo.threshold) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
doFilter(pIndefInfo->pCondition, pInfo->pRes);
|
doFilter(pIndefInfo->pCondition, pInfo->pRes);
|
||||||
|
size_t rows = pInfo->pRes->info.rows;
|
||||||
|
if (rows >= 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
size_t rows = pInfo->pRes->info.rows;
|
size_t rows = pInfo->pRes->info.rows;
|
||||||
pOperator->resultInfo.totalRows += rows;
|
pOperator->resultInfo.totalRows += rows;
|
||||||
|
@ -3928,24 +3968,23 @@ SOperatorInfo* createIndefinitOutputOperatorInfo(SOperatorInfo* downstream, SPhy
|
||||||
if (numOfRows * pResBlock->info.rowSize > TWOMB) {
|
if (numOfRows * pResBlock->info.rowSize > TWOMB) {
|
||||||
numOfRows = TWOMB / pResBlock->info.rowSize;
|
numOfRows = TWOMB / pResBlock->info.rowSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
initResultSizeInfo(pOperator, numOfRows);
|
initResultSizeInfo(pOperator, numOfRows);
|
||||||
|
|
||||||
initAggInfo(&pOperator->exprSupp, &pInfo->aggSup, pExprInfo, numOfExpr, keyBufSize, pTaskInfo->id.str);
|
initAggInfo(pSup, &pInfo->aggSup, pExprInfo, numOfExpr, keyBufSize, pTaskInfo->id.str);
|
||||||
initBasicInfo(&pInfo->binfo, pResBlock);
|
initBasicInfo(&pInfo->binfo, pResBlock);
|
||||||
|
|
||||||
setFunctionResultOutput(pOperator, &pInfo->binfo, &pInfo->aggSup, MAIN_SCAN, numOfExpr);
|
setFunctionResultOutput(pOperator, &pInfo->binfo, &pInfo->aggSup, MAIN_SCAN, numOfExpr);
|
||||||
|
|
||||||
pInfo->binfo.pRes = pResBlock;
|
pInfo->binfo.pRes = pResBlock;
|
||||||
pInfo->pPseudoColInfo = setRowTsColumnOutputInfo(pSup->pCtx, numOfExpr);
|
|
||||||
pInfo->pCondition = pPhyNode->node.pConditions;
|
pInfo->pCondition = pPhyNode->node.pConditions;
|
||||||
|
pInfo->pPseudoColInfo= setRowTsColumnOutputInfo(pSup->pCtx, numOfExpr);
|
||||||
|
|
||||||
pOperator->name = "IndefinitOperator";
|
pOperator->name = "IndefinitOperator";
|
||||||
pOperator->operatorType = QUERY_NODE_PHYSICAL_PLAN_PROJECT;
|
pOperator->operatorType = QUERY_NODE_PHYSICAL_PLAN_INDEF_ROWS_FUNC;
|
||||||
pOperator->blocking = false;
|
pOperator->blocking = false;
|
||||||
pOperator->status = OP_NOT_OPENED;
|
pOperator->status = OP_NOT_OPENED;
|
||||||
pOperator->info = pInfo;
|
pOperator->info = pInfo;
|
||||||
pOperator->exprSupp.pExprInfo = pExprInfo;
|
|
||||||
pOperator->exprSupp.numOfExprs = numOfExpr;
|
|
||||||
pOperator->pTaskInfo = pTaskInfo;
|
pOperator->pTaskInfo = pTaskInfo;
|
||||||
|
|
||||||
pOperator->fpSet = createOperatorFpSet(operatorDummyOpenFn, doApplyIndefinitFunction, NULL, NULL,
|
pOperator->fpSet = createOperatorFpSet(operatorDummyOpenFn, doApplyIndefinitFunction, NULL, NULL,
|
||||||
|
|
|
@ -637,6 +637,7 @@ static SSDataBlock* buildPartitionResult(SOperatorInfo* pOperator) {
|
||||||
int32_t* pageId = taosArrayGet(pGroupInfo->pPageList, pInfo->pageIndex);
|
int32_t* pageId = taosArrayGet(pGroupInfo->pPageList, pInfo->pageIndex);
|
||||||
void* page = getBufPage(pInfo->pBuf, *pageId);
|
void* page = getBufPage(pInfo->pBuf, *pageId);
|
||||||
|
|
||||||
|
blockDataEnsureCapacity(pInfo->binfo.pRes, pInfo->rowCapacity);
|
||||||
blockDataFromBuf1(pInfo->binfo.pRes, page, pInfo->rowCapacity);
|
blockDataFromBuf1(pInfo->binfo.pRes, page, pInfo->rowCapacity);
|
||||||
|
|
||||||
pInfo->pageIndex += 1;
|
pInfo->pageIndex += 1;
|
||||||
|
|
|
@ -360,15 +360,15 @@ class TDTestCase:
|
||||||
tdSql.checkRows(229)
|
tdSql.checkRows(229)
|
||||||
tdSql.checkData(0,0,0)
|
tdSql.checkData(0,0,0)
|
||||||
tdSql.query("select diff(c1) from stb1 partition by tbname ")
|
tdSql.query("select diff(c1) from stb1 partition by tbname ")
|
||||||
tdSql.checkRows(199)
|
tdSql.checkRows(190)
|
||||||
# tdSql.query("select diff(st1) from stb1 partition by tbname")
|
# tdSql.query("select diff(st1) from stb1 partition by tbname")
|
||||||
# tdSql.checkRows(229)
|
# tdSql.checkRows(229)
|
||||||
tdSql.query("select diff(st1+c1) from stb1 partition by tbname")
|
tdSql.query("select diff(st1+c1) from stb1 partition by tbname")
|
||||||
tdSql.checkRows(199)
|
tdSql.checkRows(190)
|
||||||
tdSql.query("select diff(st1+c1) from stb1 partition by tbname")
|
tdSql.query("select diff(st1+c1) from stb1 partition by tbname")
|
||||||
tdSql.checkRows(199)
|
tdSql.checkRows(190)
|
||||||
tdSql.query("select diff(st1+c1) from stb1 partition by tbname")
|
tdSql.query("select diff(st1+c1) from stb1 partition by tbname")
|
||||||
tdSql.checkRows(199)
|
tdSql.checkRows(190)
|
||||||
|
|
||||||
# # bug need fix
|
# # bug need fix
|
||||||
# tdSql.query("select diff(st1+c1) from stb1 partition by tbname slimit 1 ")
|
# tdSql.query("select diff(st1+c1) from stb1 partition by tbname slimit 1 ")
|
||||||
|
@ -378,7 +378,7 @@ class TDTestCase:
|
||||||
|
|
||||||
# bug need fix
|
# bug need fix
|
||||||
tdSql.query("select diff(st1+c1) from stb1 partition by tbname")
|
tdSql.query("select diff(st1+c1) from stb1 partition by tbname")
|
||||||
tdSql.checkRows(199)
|
tdSql.checkRows(190)
|
||||||
|
|
||||||
# bug need fix
|
# bug need fix
|
||||||
# tdSql.query("select tbname , diff(c1) from stb1 partition by tbname")
|
# tdSql.query("select tbname , diff(c1) from stb1 partition by tbname")
|
||||||
|
|
|
@ -678,15 +678,15 @@ class TDTestCase:
|
||||||
tdSql.checkRows(68)
|
tdSql.checkRows(68)
|
||||||
tdSql.checkData(0,0,1.000000000)
|
tdSql.checkData(0,0,1.000000000)
|
||||||
tdSql.query("select mavg(c1,3) from stb1 partition by tbname ")
|
tdSql.query("select mavg(c1,3) from stb1 partition by tbname ")
|
||||||
tdSql.checkRows(38)
|
tdSql.checkRows(20)
|
||||||
# tdSql.query("select mavg(st1,3) from stb1 partition by tbname")
|
# tdSql.query("select mavg(st1,3) from stb1 partition by tbname")
|
||||||
# tdSql.checkRows(38)
|
# tdSql.checkRows(38)
|
||||||
tdSql.query("select mavg(st1+c1,3) from stb1 partition by tbname")
|
tdSql.query("select mavg(st1+c1,3) from stb1 partition by tbname")
|
||||||
tdSql.checkRows(38)
|
tdSql.checkRows(20)
|
||||||
tdSql.query("select mavg(st1+c1,3) from stb1 partition by tbname")
|
tdSql.query("select mavg(st1+c1,3) from stb1 partition by tbname")
|
||||||
tdSql.checkRows(38)
|
tdSql.checkRows(20)
|
||||||
tdSql.query("select mavg(st1+c1,3) from stb1 partition by tbname")
|
tdSql.query("select mavg(st1+c1,3) from stb1 partition by tbname")
|
||||||
tdSql.checkRows(38)
|
tdSql.checkRows(20)
|
||||||
|
|
||||||
# # bug need fix
|
# # bug need fix
|
||||||
# tdSql.query("select mavg(st1+c1,3) from stb1 partition by tbname slimit 1 ")
|
# tdSql.query("select mavg(st1+c1,3) from stb1 partition by tbname slimit 1 ")
|
||||||
|
@ -696,7 +696,7 @@ class TDTestCase:
|
||||||
|
|
||||||
# bug need fix
|
# bug need fix
|
||||||
tdSql.query("select mavg(st1+c1,3) from stb1 partition by tbname")
|
tdSql.query("select mavg(st1+c1,3) from stb1 partition by tbname")
|
||||||
tdSql.checkRows(38)
|
tdSql.checkRows(20)
|
||||||
|
|
||||||
# bug need fix
|
# bug need fix
|
||||||
# tdSql.query("select tbname , mavg(c1,3) from stb1 partition by tbname")
|
# tdSql.query("select tbname , mavg(c1,3) from stb1 partition by tbname")
|
||||||
|
|
Loading…
Reference in New Issue