diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index 3e907e5d77171bd2ac639ba21762ef1f7d8bf4e2..c747eb2fe8405e899c67eaad9476badfda9b2077 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -1449,6 +1449,7 @@ void tscHandleMasterJoinQuery(SSqlObj* pSql) { tscDebug("%p start subquery, total:%d", pSql, pQueryInfo->numOfTables); for (int32_t i = 0; i < pQueryInfo->numOfTables; ++i) { + SJoinSupporter *pSupporter = tscCreateJoinSupporter(pSql, i); if (pSupporter == NULL) { // failed to create support struct, abort current query diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index e2cc4403354bc0cd14fab075b000c20448eb53bf..117874475ba9c120d612643d14250810bd0f5e8c 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -2158,7 +2158,7 @@ int16_t tscGetJoinTagColIdByUid(STagCond* pTagCond, uint64_t uid) { } int16_t tscGetTagColIndexById(STableMeta* pTableMeta, int16_t colId) { - int32_t numOfTags = tscGetNumOfColumns(pTableMeta); + int32_t numOfTags = tscGetNumOfTags(pTableMeta); SSchema* pSchema = tscGetTableTagSchema(pTableMeta); for(int32_t i = 0; i < numOfTags; ++i) { @@ -2167,7 +2167,9 @@ int16_t tscGetTagColIndexById(STableMeta* pTableMeta, int16_t colId) { } } - return -1; + // can not reach here + assert(0); + return INT16_MIN; } bool tscIsUpdateQuery(SSqlObj* pSql) {