fix parser/planner/nodes ret check ci
This commit is contained in:
parent
4d5cd9cd1a
commit
d35bdba180
|
@ -239,7 +239,7 @@ static int32_t addTimezoneParam(SNodeList* pList) {
|
||||||
varDataSetLen(pVal->datum.p, len);
|
varDataSetLen(pVal->datum.p, len);
|
||||||
(void)strncpy(varDataVal(pVal->datum.p), pVal->literal, len);
|
(void)strncpy(varDataVal(pVal->datum.p), pVal->literal, len);
|
||||||
|
|
||||||
int32_t code = nodesListAppend(pList, (SNode*)pVal);
|
code = nodesListAppend(pList, (SNode*)pVal);
|
||||||
if (TSDB_CODE_SUCCESS != code) {
|
if (TSDB_CODE_SUCCESS != code) {
|
||||||
nodesDestroyNode((SNode*)pVal);
|
nodesDestroyNode((SNode*)pVal);
|
||||||
return code;
|
return code;
|
||||||
|
@ -263,7 +263,7 @@ static int32_t addDbPrecisonParam(SNodeList** pList, uint8_t precision) {
|
||||||
pVal->datum.i = (int64_t)precision;
|
pVal->datum.i = (int64_t)precision;
|
||||||
pVal->typeData = (int64_t)precision;
|
pVal->typeData = (int64_t)precision;
|
||||||
|
|
||||||
int32_t code = nodesListMakeAppend(pList, (SNode*)pVal);
|
code = nodesListMakeAppend(pList, (SNode*)pVal);
|
||||||
if (TSDB_CODE_SUCCESS != code) {
|
if (TSDB_CODE_SUCCESS != code) {
|
||||||
nodesDestroyNode((SNode*)pVal);
|
nodesDestroyNode((SNode*)pVal);
|
||||||
return code;
|
return code;
|
||||||
|
|
|
@ -400,7 +400,7 @@ int32_t createFunction(const char* pName, SNodeList* pParameterList, SFunctionNo
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t createColumnByFunc(const SFunctionNode* pFunc, SColumnNode** ppCol) {
|
static int32_t createColumnByFunc(const SFunctionNode* pFunc, SColumnNode** ppCol) {
|
||||||
int32_t code = nodesMakeNode(QUERY_NODE_COLUMN, (SNode**)&ppCol);
|
int32_t code = nodesMakeNode(QUERY_NODE_COLUMN, (SNode**)ppCol);
|
||||||
if (NULL == *ppCol) {
|
if (NULL == *ppCol) {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1243,10 +1243,7 @@ static int32_t collectUseTable(const SName* pName, SHashObj* pTable) {
|
||||||
|
|
||||||
static int32_t collectUseDatabase(const SName* pName, SHashObj* pDbs) {
|
static int32_t collectUseDatabase(const SName* pName, SHashObj* pDbs) {
|
||||||
char dbFName[TSDB_DB_FNAME_LEN] = {0};
|
char dbFName[TSDB_DB_FNAME_LEN] = {0};
|
||||||
int32_t code = tNameGetFullDbName(pName, dbFName);
|
(void)tNameGetFullDbName(pName, dbFName);
|
||||||
if (TSDB_CODE_SUCCESS != code) {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
return taosHashPut(pDbs, dbFName, strlen(dbFName), dbFName, sizeof(dbFName));
|
return taosHashPut(pDbs, dbFName, strlen(dbFName), dbFName, sizeof(dbFName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2217,6 +2214,9 @@ static int32_t parseDataFromFileImpl(SInsertParseContext* pCxt, SVnodeModifyOpSt
|
||||||
// init only for file
|
// init only for file
|
||||||
if (NULL == pStmt->pTableCxtHashObj) {
|
if (NULL == pStmt->pTableCxtHashObj) {
|
||||||
pStmt->pTableCxtHashObj = taosHashInit(128, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), true, HASH_NO_LOCK);
|
pStmt->pTableCxtHashObj = taosHashInit(128, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), true, HASH_NO_LOCK);
|
||||||
|
if (!pStmt->pTableCxtHashObj) {
|
||||||
|
return TSDB_CODE_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
int32_t numOfRows = 0;
|
int32_t numOfRows = 0;
|
||||||
int32_t code = parseCsvFile(pCxt, pStmt, rowsDataCxt, &numOfRows);
|
int32_t code = parseCsvFile(pCxt, pStmt, rowsDataCxt, &numOfRows);
|
||||||
|
|
|
@ -48,7 +48,7 @@ class TableBuilder : public ITableBuilder {
|
||||||
SVgroupInfo vgroup = {vgid, 0, 0, {0}, 0};
|
SVgroupInfo vgroup = {vgid, 0, 0, {0}, 0};
|
||||||
assert(TSDB_CODE_SUCCESS == addEpIntoEpSet(&vgroup.epSet, "dnode_1", 6030));
|
assert(TSDB_CODE_SUCCESS == addEpIntoEpSet(&vgroup.epSet, "dnode_1", 6030));
|
||||||
assert(TSDB_CODE_SUCCESS == addEpIntoEpSet(&vgroup.epSet, "dnode_2", 6030));
|
assert(TSDB_CODE_SUCCESS == addEpIntoEpSet(&vgroup.epSet, "dnode_2", 6030));
|
||||||
assert(TSDB_CODE_FAILED == addEpIntoEpSet(&vgroup.epSet, "dnode_3", 6030));
|
assert(TSDB_CODE_SUCCESS == addEpIntoEpSet(&vgroup.epSet, "dnode_3", 6030));
|
||||||
vgroup.epSet.inUse = 0;
|
vgroup.epSet.inUse = 0;
|
||||||
|
|
||||||
(void)meta_->vgs.emplace_back(vgroup);
|
(void)meta_->vgs.emplace_back(vgroup);
|
||||||
|
|
|
@ -685,7 +685,7 @@ TEST_F(ParserInitialCTest, createSmaIndex) {
|
||||||
pCmdMsg->msgLen = tSerializeSMCreateSmaReq(NULL, 0, pStmt->pReq);
|
pCmdMsg->msgLen = tSerializeSMCreateSmaReq(NULL, 0, pStmt->pReq);
|
||||||
pCmdMsg->pMsg = taosMemoryMalloc(pCmdMsg->msgLen);
|
pCmdMsg->pMsg = taosMemoryMalloc(pCmdMsg->msgLen);
|
||||||
if (!pCmdMsg->pMsg) FAIL();
|
if (!pCmdMsg->pMsg) FAIL();
|
||||||
ASSERT_EQ(TSDB_CODE_SUCCESS, tSerializeSMCreateSmaReq(pCmdMsg->pMsg, pCmdMsg->msgLen, pStmt->pReq));
|
ASSERT_TRUE(0 < tSerializeSMCreateSmaReq(pCmdMsg->pMsg, pCmdMsg->msgLen, pStmt->pReq));
|
||||||
((SQuery*)pQuery)->pCmdMsg = pCmdMsg;
|
((SQuery*)pQuery)->pCmdMsg = pCmdMsg;
|
||||||
ASSERT_TRUE(TSDB_CODE_SUCCESS == tDeserializeSMCreateSmaReq(pQuery->pCmdMsg->pMsg, pQuery->pCmdMsg->msgLen, &req));
|
ASSERT_TRUE(TSDB_CODE_SUCCESS == tDeserializeSMCreateSmaReq(pQuery->pCmdMsg->pMsg, pQuery->pCmdMsg->msgLen, &req));
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,7 @@ int32_t getLogLevel() { return g_logLevel; }
|
||||||
class ParserTestBaseImpl {
|
class ParserTestBaseImpl {
|
||||||
public:
|
public:
|
||||||
ParserTestBaseImpl(ParserTestBase* pBase) : pBase_(pBase), sqlNo_(0), sqlNum_(0) {
|
ParserTestBaseImpl(ParserTestBase* pBase) : pBase_(pBase), sqlNo_(0), sqlNum_(0) {
|
||||||
|
assert(TSDB_CODE_SUCCESS == qInitKeywordsTable());
|
||||||
caseEnv_.numOfSkipSql_ = g_skipSql;
|
caseEnv_.numOfSkipSql_ = g_skipSql;
|
||||||
caseEnv_.numOfLimitSql_ = g_limitSql;
|
caseEnv_.numOfLimitSql_ = g_limitSql;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ int32_t getLogLevel() { return g_logLevel; }
|
||||||
|
|
||||||
class PlannerTestBaseImpl {
|
class PlannerTestBaseImpl {
|
||||||
public:
|
public:
|
||||||
PlannerTestBaseImpl() : sqlNo_(0), sqlNum_(0) {}
|
PlannerTestBaseImpl() : sqlNo_(0), sqlNum_(0) { assert(qInitKeywordsTable() == 0); }
|
||||||
|
|
||||||
void useDb(const string& user, const string& db) {
|
void useDb(const string& user, const string& db) {
|
||||||
caseEnv_.acctId_ = 0;
|
caseEnv_.acctId_ = 0;
|
||||||
|
@ -448,7 +448,7 @@ class PlannerTestBaseImpl {
|
||||||
pCmdMsg->msgLen = tSerializeSMCreateSmaReq(NULL, 0, pStmt->pReq);
|
pCmdMsg->msgLen = tSerializeSMCreateSmaReq(NULL, 0, pStmt->pReq);
|
||||||
pCmdMsg->pMsg = taosMemoryMalloc(pCmdMsg->msgLen);
|
pCmdMsg->pMsg = taosMemoryMalloc(pCmdMsg->msgLen);
|
||||||
if (!pCmdMsg->pMsg) FAIL();
|
if (!pCmdMsg->pMsg) FAIL();
|
||||||
ASSERT_EQ(TSDB_CODE_SUCCESS, tSerializeSMCreateSmaReq(pCmdMsg->pMsg, pCmdMsg->msgLen, pStmt->pReq));
|
ASSERT_TRUE(0 < tSerializeSMCreateSmaReq(pCmdMsg->pMsg, pCmdMsg->msgLen, pStmt->pReq));
|
||||||
((SQuery*)pQuery)->pCmdMsg = pCmdMsg;
|
((SQuery*)pQuery)->pCmdMsg = pCmdMsg;
|
||||||
|
|
||||||
ASSERT_EQ(TSDB_CODE_SUCCESS, tDeserializeSMCreateSmaReq(pQuery->pCmdMsg->pMsg, pQuery->pCmdMsg->msgLen, &req));
|
ASSERT_EQ(TSDB_CODE_SUCCESS, tDeserializeSMCreateSmaReq(pQuery->pCmdMsg->pMsg, pQuery->pCmdMsg->msgLen, &req));
|
||||||
|
|
Loading…
Reference in New Issue