Merge pull request #14707 from taosdata/feature/3_liaohj
fix(query): add error code check.
This commit is contained in:
commit
2acb7c1a51
|
@ -39,8 +39,8 @@ static int32_t buildSysDbTableInfo(const SSysTableScanInfo* pInfo, int32_t capac
|
|||
static int32_t buildDbTableInfoBlock(const SSDataBlock* p, const SSysTableMeta* pSysDbTableMeta, size_t size,
|
||||
const char* dbName);
|
||||
|
||||
static void addTagPseudoColumnData(SReadHandle* pHandle, SExprInfo* pPseudoExpr, int32_t numOfPseudoExpr,
|
||||
SSDataBlock* pBlock);
|
||||
static int32_t addTagPseudoColumnData(SReadHandle* pHandle, SExprInfo* pPseudoExpr, int32_t numOfPseudoExpr,
|
||||
SSDataBlock* pBlock, const char* idStr);
|
||||
static bool processBlockWithProbability(const SSampleExecInfo* pInfo);
|
||||
|
||||
bool processBlockWithProbability(const SSampleExecInfo* pInfo) {
|
||||
|
@ -264,7 +264,11 @@ static int32_t loadDataBlock(SOperatorInfo* pOperator, STableScanInfo* pTableSca
|
|||
// currently only the tbname pseudo column
|
||||
if (pTableScanInfo->pseudoSup.numOfExprs > 0) {
|
||||
SExprSupp* pSup = &pTableScanInfo->pseudoSup;
|
||||
addTagPseudoColumnData(&pTableScanInfo->readHandle, pSup->pExprInfo, pSup->numOfExprs, pBlock);
|
||||
|
||||
int32_t code = addTagPseudoColumnData(&pTableScanInfo->readHandle, pSup->pExprInfo, pSup->numOfExprs, pBlock, GET_TASKID(pTaskInfo));
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
longjmp(pTaskInfo->env, code);
|
||||
}
|
||||
}
|
||||
|
||||
int64_t st = taosGetTimestampMs();
|
||||
|
@ -298,16 +302,21 @@ static void prepareForDescendingScan(STableScanInfo* pTableScanInfo, SqlFunction
|
|||
taosqsort(pCond->twindows, pCond->numOfTWindows, sizeof(STimeWindow), pCond, compareTimeWindow);
|
||||
}
|
||||
|
||||
void addTagPseudoColumnData(SReadHandle* pHandle, SExprInfo* pPseudoExpr, int32_t numOfPseudoExpr,
|
||||
SSDataBlock* pBlock) {
|
||||
int32_t addTagPseudoColumnData(SReadHandle* pHandle, SExprInfo* pPseudoExpr, int32_t numOfPseudoExpr,
|
||||
SSDataBlock* pBlock, const char* idStr) {
|
||||
// currently only the tbname pseudo column
|
||||
if (numOfPseudoExpr == 0) {
|
||||
return;
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
SMetaReader mr = {0};
|
||||
metaReaderInit(&mr, pHandle->meta, 0);
|
||||
metaGetTableEntryByUid(&mr, pBlock->info.uid);
|
||||
int32_t code = metaGetTableEntryByUid(&mr, pBlock->info.uid);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
qError("failed to get table meta, uid:0x%"PRIx64 ", code:%s, %s", pBlock->info.uid, tstrerror(terrno), idStr);
|
||||
metaReaderClear(&mr);
|
||||
return terrno;
|
||||
}
|
||||
|
||||
for (int32_t j = 0; j < numOfPseudoExpr; ++j) {
|
||||
SExprInfo* pExpr = &pPseudoExpr[j];
|
||||
|
@ -349,6 +358,7 @@ void addTagPseudoColumnData(SReadHandle* pHandle, SExprInfo* pPseudoExpr, int32_
|
|||
}
|
||||
|
||||
metaReaderClear(&mr);
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
void setTbNameColData(void* pMeta, const SSDataBlock* pBlock, SColumnInfoData* pColInfoData, int32_t functionId) {
|
||||
|
@ -680,34 +690,46 @@ SOperatorInfo* createTableSeqScanOperatorInfo(void* pReadHandle, SExecTaskInfo*
|
|||
return pOperator;
|
||||
}
|
||||
|
||||
static int32_t doGetTableRowSize(void* pMeta, uint64_t uid) {
|
||||
int32_t rowLen = 0;
|
||||
static int32_t doGetTableRowSize(void* pMeta, uint64_t uid, int32_t* rowLen, const char* idstr) {
|
||||
*rowLen = 0;
|
||||
|
||||
SMetaReader mr = {0};
|
||||
metaReaderInit(&mr, pMeta, 0);
|
||||
metaGetTableEntryByUid(&mr, uid);
|
||||
int32_t code = metaGetTableEntryByUid(&mr, uid);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
qError("failed to get table meta, uid:0x%"PRIx64 ", code:%s, %s", uid, tstrerror(terrno), idstr);
|
||||
metaReaderClear(&mr);
|
||||
return terrno;
|
||||
}
|
||||
|
||||
if (mr.me.type == TSDB_SUPER_TABLE) {
|
||||
int32_t numOfCols = mr.me.stbEntry.schemaRow.nCols;
|
||||
for (int32_t i = 0; i < numOfCols; ++i) {
|
||||
rowLen += mr.me.stbEntry.schemaRow.pSchema[i].bytes;
|
||||
(*rowLen) += mr.me.stbEntry.schemaRow.pSchema[i].bytes;
|
||||
}
|
||||
} else if (mr.me.type == TSDB_CHILD_TABLE) {
|
||||
uint64_t suid = mr.me.ctbEntry.suid;
|
||||
metaGetTableEntryByUid(&mr, suid);
|
||||
code = metaGetTableEntryByUid(&mr, suid);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
qError("failed to get table meta, uid:0x%"PRIx64 ", code:%s, %s", suid, tstrerror(terrno), idstr);
|
||||
metaReaderClear(&mr);
|
||||
return terrno;
|
||||
}
|
||||
|
||||
int32_t numOfCols = mr.me.stbEntry.schemaRow.nCols;
|
||||
|
||||
for (int32_t i = 0; i < numOfCols; ++i) {
|
||||
rowLen += mr.me.stbEntry.schemaRow.pSchema[i].bytes;
|
||||
(*rowLen) += mr.me.stbEntry.schemaRow.pSchema[i].bytes;
|
||||
}
|
||||
} else if (mr.me.type == TSDB_NORMAL_TABLE) {
|
||||
int32_t numOfCols = mr.me.ntbEntry.schemaRow.nCols;
|
||||
for (int32_t i = 0; i < numOfCols; ++i) {
|
||||
rowLen += mr.me.ntbEntry.schemaRow.pSchema[i].bytes;
|
||||
(*rowLen) += mr.me.ntbEntry.schemaRow.pSchema[i].bytes;
|
||||
}
|
||||
}
|
||||
|
||||
metaReaderClear(&mr);
|
||||
return rowLen;
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
static SSDataBlock* doBlockInfoScan(SOperatorInfo* pOperator) {
|
||||
|
@ -716,9 +738,13 @@ static SSDataBlock* doBlockInfoScan(SOperatorInfo* pOperator) {
|
|||
}
|
||||
|
||||
SBlockDistInfo* pBlockScanInfo = pOperator->info;
|
||||
SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
|
||||
|
||||
STableBlockDistInfo blockDistInfo = {.minRows = INT_MAX, .maxRows = INT_MIN};
|
||||
blockDistInfo.rowSize = doGetTableRowSize(pBlockScanInfo->readHandle.meta, pBlockScanInfo->uid);
|
||||
int32_t code = doGetTableRowSize(pBlockScanInfo->readHandle.meta, pBlockScanInfo->uid, &blockDistInfo.rowSize, GET_TASKID(pTaskInfo));
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
longjmp(pTaskInfo->env, code);
|
||||
}
|
||||
|
||||
tsdbGetFileBlocksDistInfo(pBlockScanInfo->pHandle, &blockDistInfo);
|
||||
blockDistInfo.numOfInmemRows = (int32_t)tsdbGetNumOfRowsInMemTable(pBlockScanInfo->pHandle);
|
||||
|
@ -1193,7 +1219,10 @@ static int32_t setBlockIntoRes(SStreamScanInfo* pInfo, const SSDataBlock* pBlock
|
|||
|
||||
// currently only the tbname pseudo column
|
||||
if (pInfo->numOfPseudoExpr > 0) {
|
||||
addTagPseudoColumnData(&pInfo->readHandle, pInfo->pPseudoExpr, pInfo->numOfPseudoExpr, pInfo->pRes);
|
||||
int32_t code = addTagPseudoColumnData(&pInfo->readHandle, pInfo->pPseudoExpr, pInfo->numOfPseudoExpr, pInfo->pRes, GET_TASKID(pTaskInfo));
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
longjmp(pTaskInfo->env, code);
|
||||
}
|
||||
}
|
||||
|
||||
doFilter(pInfo->pCondition, pInfo->pRes);
|
||||
|
@ -1414,7 +1443,10 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
|
|||
|
||||
// currently only the tbname pseudo column
|
||||
if (pInfo->numOfPseudoExpr > 0) {
|
||||
addTagPseudoColumnData(&pInfo->readHandle, pInfo->pPseudoExpr, pInfo->numOfPseudoExpr, pInfo->pRes);
|
||||
code = addTagPseudoColumnData(&pInfo->readHandle, pInfo->pPseudoExpr, pInfo->numOfPseudoExpr, pInfo->pRes, GET_TASKID(pTaskInfo));
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
longjmp(pTaskInfo->env, code);
|
||||
}
|
||||
}
|
||||
|
||||
doFilter(pInfo->pCondition, pInfo->pRes);
|
||||
|
@ -1839,7 +1871,16 @@ static SSDataBlock* doSysTableScan(SOperatorInfo* pOperator) {
|
|||
|
||||
SMetaReader mr = {0};
|
||||
metaReaderInit(&mr, pInfo->readHandle.meta, 0);
|
||||
metaGetTableEntryByUid(&mr, pInfo->pCur->mr.me.ctbEntry.suid);
|
||||
|
||||
uint64_t suid = pInfo->pCur->mr.me.ctbEntry.suid;
|
||||
int32_t code = metaGetTableEntryByUid(&mr, suid);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
qError("failed to get super table meta, uid:0x%"PRIx64 ", code:%s, %s", suid, tstrerror(terrno), GET_TASKID(pTaskInfo));
|
||||
metaReaderClear(&mr);
|
||||
metaCloseTbCursor(pInfo->pCur);
|
||||
pInfo->pCur = NULL;
|
||||
longjmp(pTaskInfo->env, terrno);
|
||||
}
|
||||
|
||||
// number of columns
|
||||
pColInfoData = taosArrayGet(p->pDataBlock, 3);
|
||||
|
@ -2234,7 +2275,12 @@ static SSDataBlock* doTagScan(SOperatorInfo* pOperator) {
|
|||
|
||||
while (pInfo->curPos < size && count < pOperator->resultInfo.capacity) {
|
||||
STableKeyInfo* item = taosArrayGet(pInfo->pTableList->pTableList, pInfo->curPos);
|
||||
metaGetTableEntryByUid(&mr, item->uid);
|
||||
int32_t code = metaGetTableEntryByUid(&mr, item->uid);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
qError("failed to get table meta, uid:0x%"PRIx64 ", code:%s, %s", item->uid, tstrerror(terrno), GET_TASKID(pTaskInfo));
|
||||
metaReaderClear(&mr);
|
||||
longjmp(pTaskInfo->env, terrno);
|
||||
}
|
||||
|
||||
for (int32_t j = 0; j < pOperator->exprSupp.numOfExprs; ++j) {
|
||||
SColumnInfoData* pDst = taosArrayGet(pRes->pDataBlock, pExprInfo[j].base.resSchema.slotId);
|
||||
|
@ -2519,8 +2565,11 @@ static int32_t loadDataBlockFromOneTable(SOperatorInfo* pOperator, STableMergeSc
|
|||
|
||||
// currently only the tbname pseudo column
|
||||
if (pTableScanInfo->numOfPseudoExpr > 0) {
|
||||
addTagPseudoColumnData(&pTableScanInfo->readHandle, pTableScanInfo->pPseudoExpr, pTableScanInfo->numOfPseudoExpr,
|
||||
pBlock);
|
||||
int32_t code = addTagPseudoColumnData(&pTableScanInfo->readHandle, pTableScanInfo->pPseudoExpr, pTableScanInfo->numOfPseudoExpr,
|
||||
pBlock, GET_TASKID(pTaskInfo));
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
longjmp(pTaskInfo->env, code);
|
||||
}
|
||||
}
|
||||
|
||||
int64_t st = taosGetTimestampMs();
|
||||
|
|
|
@ -205,13 +205,19 @@ void flttMakeListNode(SNode **pNode, SNodeList *list, int32_t resType) {
|
|||
*pNode = (SNode *)lnode;
|
||||
}
|
||||
|
||||
void initScalarParam(SScalarParam* pParam) {
|
||||
memset(pParam, 0, sizeof(SScalarParam));
|
||||
pParam->type = SHOULD_FREE_COLDATA;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TEST(timerangeTest, greater) {
|
||||
SNode *pcol = NULL, *pval = NULL, *opNode1 = NULL;
|
||||
bool eRes[5] = {false, false, true, true, true};
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
|
||||
int64_t tsmall = 222, tbig = 333;
|
||||
flttMakeColumnNode(&pcol, NULL, TSDB_DATA_TYPE_TIMESTAMP, sizeof(int64_t), 0, NULL);
|
||||
flttMakeValueNode(&pval, TSDB_DATA_TYPE_TIMESTAMP, &tsmall);
|
||||
|
@ -234,7 +240,8 @@ TEST(timerangeTest, greater) {
|
|||
TEST(timerangeTest, greater_and_lower) {
|
||||
SNode *pcol = NULL, *pval = NULL, *opNode1 = NULL, *opNode2 = NULL, *logicNode = NULL;
|
||||
bool eRes[5] = {false, false, true, true, true};
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
int64_t tsmall = 222, tbig = 333;
|
||||
flttMakeColumnNode(&pcol, NULL, TSDB_DATA_TYPE_TIMESTAMP, sizeof(int64_t), 0, NULL);
|
||||
flttMakeValueNode(&pval, TSDB_DATA_TYPE_TIMESTAMP, &tsmall);
|
||||
|
@ -265,7 +272,8 @@ TEST(timerangeTest, greater_and_lower) {
|
|||
TEST(timerangeTest, greater_equal_and_lower_equal) {
|
||||
SNode *pcol = NULL, *pval = NULL, *opNode1 = NULL, *opNode2 = NULL, *logicNode = NULL;
|
||||
bool eRes[5] = {false, false, true, true, true};
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
int64_t tsmall = 222, tbig = 333;
|
||||
flttMakeColumnNode(&pcol, NULL, TSDB_DATA_TYPE_TIMESTAMP, sizeof(int64_t), 0, NULL);
|
||||
flttMakeValueNode(&pval, TSDB_DATA_TYPE_TIMESTAMP, &tsmall);
|
||||
|
@ -297,7 +305,8 @@ TEST(timerangeTest, greater_equal_and_lower_equal) {
|
|||
TEST(timerangeTest, greater_and_lower_not_strict) {
|
||||
SNode *pcol = NULL, *pval = NULL, *opNode1 = NULL, *opNode2 = NULL, *logicNode1 = NULL, *logicNode2 = NULL;
|
||||
bool eRes[5] = {false, false, true, true, true};
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
int64_t tsmall1 = 222, tbig1 = 333;
|
||||
int64_t tsmall2 = 444, tbig2 = 555;
|
||||
SNode *list[2] = {0};
|
||||
|
@ -350,7 +359,8 @@ TEST(columnTest, smallint_column_greater_double_value) {
|
|||
double rightv= 2.5;
|
||||
int8_t eRes[5] = {0, 0, 1, 1, 1};
|
||||
SSDataBlock *src = NULL;
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
int32_t rowNum = sizeof(leftv)/sizeof(leftv[0]);
|
||||
flttMakeColumnNode(&pLeft, &src, TSDB_DATA_TYPE_SMALLINT, sizeof(int16_t), rowNum, leftv);
|
||||
flttMakeValueNode(&pRight, TSDB_DATA_TYPE_DOUBLE, &rightv);
|
||||
|
@ -405,7 +415,8 @@ TEST(columnTest, int_column_greater_smallint_value) {
|
|||
int16_t rightv= 4;
|
||||
int8_t eRes[5] = {0, 0, 1, 1, 1};
|
||||
SSDataBlock *src = NULL;
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
int32_t rowNum = sizeof(leftv)/sizeof(leftv[0]);
|
||||
flttMakeColumnNode(&pLeft, &src, TSDB_DATA_TYPE_INT, sizeof(int32_t), rowNum, leftv);
|
||||
flttMakeValueNode(&pRight, TSDB_DATA_TYPE_SMALLINT, &rightv);
|
||||
|
@ -460,7 +471,8 @@ TEST(columnTest, int_column_in_double_list) {
|
|||
double rightv1 = 1.1,rightv2 = 2.2,rightv3 = 3.3;
|
||||
bool eRes[5] = {true, true, true, false, false};
|
||||
SSDataBlock *src = NULL;
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
int32_t rowNum = sizeof(leftv)/sizeof(leftv[0]);
|
||||
flttMakeColumnNode(&pLeft, &src, TSDB_DATA_TYPE_INT, sizeof(int32_t), rowNum, leftv);
|
||||
SNodeList* list = nodesMakeList();
|
||||
|
@ -503,7 +515,8 @@ TEST(columnTest, binary_column_in_binary_list) {
|
|||
SNode *pLeft = NULL, *pRight = NULL, *listNode = NULL, *opNode = NULL;
|
||||
bool eRes[5] = {true, true, false, false, false};
|
||||
SSDataBlock *src = NULL;
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
char leftv[5][5]= {0};
|
||||
char rightv[3][5]= {0};
|
||||
for (int32_t i = 0; i < 5; ++i) {
|
||||
|
@ -567,7 +580,8 @@ TEST(columnTest, binary_column_like_binary) {
|
|||
char rightv[64] = {0};
|
||||
char leftv[5][5]= {0};
|
||||
SSDataBlock *src = NULL;
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
bool eRes[5] = {true, false, true, false, true};
|
||||
|
||||
for (int32_t i = 0; i < 5; ++i) {
|
||||
|
@ -614,7 +628,8 @@ TEST(columnTest, binary_column_is_null) {
|
|||
SNode *pLeft = NULL, *opNode = NULL;
|
||||
char leftv[5][5]= {0};
|
||||
SSDataBlock *src = NULL;
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
bool eRes[5] = {false, false, true, false, true};
|
||||
|
||||
for (int32_t i = 0; i < 5; ++i) {
|
||||
|
@ -661,7 +676,8 @@ TEST(columnTest, binary_column_is_not_null) {
|
|||
SNode *pLeft = NULL, *opNode = NULL;
|
||||
char leftv[5][5]= {0};
|
||||
SSDataBlock *src = NULL;
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
bool eRes[5] = {true, true, true, true, false};
|
||||
|
||||
for (int32_t i = 0; i < 5; ++i) {
|
||||
|
@ -710,7 +726,8 @@ TEST(opTest, smallint_column_greater_int_column) {
|
|||
int32_t rightv[5]= {0, -5, -4, 23, 100};
|
||||
bool eRes[5] = {true, false, true, false, true};
|
||||
SSDataBlock *src = NULL;
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
int32_t rowNum = sizeof(rightv)/sizeof(rightv[0]);
|
||||
flttMakeColumnNode(&pLeft, &src, TSDB_DATA_TYPE_SMALLINT, sizeof(int16_t), rowNum, leftv);
|
||||
flttMakeColumnNode(&pRight, &src, TSDB_DATA_TYPE_INT, sizeof(int32_t), rowNum, rightv);
|
||||
|
@ -747,7 +764,8 @@ TEST(opTest, smallint_value_add_int_column) {
|
|||
int16_t rightv[5]= {0, -1, -4, -1, 100};
|
||||
bool eRes[5] = {true, false, true, false, true};
|
||||
SSDataBlock *src = NULL;
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
int32_t rowNum = sizeof(rightv)/sizeof(rightv[0]);
|
||||
flttMakeValueNode(&pLeft, TSDB_DATA_TYPE_INT, &leftv);
|
||||
flttMakeColumnNode(&pRight, &src, TSDB_DATA_TYPE_SMALLINT, sizeof(int16_t), rowNum, rightv);
|
||||
|
@ -790,7 +808,8 @@ TEST(opTest, bigint_column_multi_binary_column) {
|
|||
}
|
||||
bool eRes[5] = {false, true, true, true, true};
|
||||
SSDataBlock *src = NULL;
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
int32_t rowNum = sizeof(rightv)/sizeof(rightv[0]);
|
||||
flttMakeColumnNode(&pLeft, &src, TSDB_DATA_TYPE_BIGINT, sizeof(int64_t), rowNum, leftv);
|
||||
flttMakeColumnNode(&pRight, &src, TSDB_DATA_TYPE_BINARY, 5, rowNum, rightv);
|
||||
|
@ -833,7 +852,8 @@ TEST(opTest, smallint_column_and_binary_column) {
|
|||
}
|
||||
bool eRes[5] = {false, false, true, false, true};
|
||||
SSDataBlock *src = NULL;
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
int32_t rowNum = sizeof(rightv)/sizeof(rightv[0]);
|
||||
flttMakeColumnNode(&pLeft, &src, TSDB_DATA_TYPE_SMALLINT, sizeof(int16_t), rowNum, leftv);
|
||||
flttMakeColumnNode(&pRight, &src, TSDB_DATA_TYPE_BINARY, 5, rowNum, rightv);
|
||||
|
@ -871,7 +891,8 @@ TEST(opTest, smallint_column_or_float_column) {
|
|||
float rightv[5]= {2.0, 3.0, 0, 5.2, 6.0};
|
||||
bool eRes[5] = {true, true, false, true, true};
|
||||
SSDataBlock *src = NULL;
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
int32_t rowNum = sizeof(rightv)/sizeof(rightv[0]);
|
||||
flttMakeColumnNode(&pLeft, &src, TSDB_DATA_TYPE_SMALLINT, sizeof(int16_t), rowNum, leftv);
|
||||
flttMakeColumnNode(&pRight, &src, TSDB_DATA_TYPE_FLOAT, sizeof(float), rowNum, rightv);
|
||||
|
@ -909,7 +930,8 @@ TEST(opTest, smallint_column_or_double_value) {
|
|||
double rightv= 10.2;
|
||||
bool eRes[5] = {true, true, true, true, true};
|
||||
SSDataBlock *src = NULL;
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
int32_t rowNum = sizeof(leftv)/sizeof(leftv[0]);
|
||||
flttMakeColumnNode(&pLeft, &src, TSDB_DATA_TYPE_SMALLINT, sizeof(int16_t), rowNum, leftv);
|
||||
flttMakeValueNode(&pRight, TSDB_DATA_TYPE_DOUBLE, &rightv);
|
||||
|
@ -945,7 +967,8 @@ TEST(opTest, binary_column_is_true) {
|
|||
SNode *pLeft = NULL, *opNode = NULL;
|
||||
char leftv[5][5]= {0};
|
||||
SSDataBlock *src = NULL;
|
||||
SScalarParam res = {0};
|
||||
SScalarParam res;
|
||||
initScalarParam(&res);
|
||||
bool eRes[5] = {false, true, false, true, false};
|
||||
|
||||
for (int32_t i = 0; i < 5; ++i) {
|
||||
|
|
Loading…
Reference in New Issue