diff --git a/src/query/inc/qExecutor.h b/src/query/inc/qExecutor.h index 5c8ac615f9685df04cc4a8aca01e713bab4dadc1..821305c607c6a9a4e1048910c9781a1b31e2b5f4 100644 --- a/src/query/inc/qExecutor.h +++ b/src/query/inc/qExecutor.h @@ -541,7 +541,7 @@ int32_t createIndirectQueryFuncExprFromMsg(SQueryTableMsg *pQueryMsg, int32_t nu SSqlGroupbyExpr *createGroupbyExprFromMsg(SQueryTableMsg *pQueryMsg, SColIndex *pColIndex, int32_t *code); SQInfo *createQInfoImpl(SQueryTableMsg *pQueryMsg, SSqlGroupbyExpr *pGroupbyExpr, SExprInfo *pExprs, - SExprInfo *pSecExprs, STableGroupInfo *pTableGroupInfo, SColumnInfo* pTagCols, bool stableQuery, char* sql, uint64_t *qId, SUdfInfo* pUdfInfo); + SExprInfo *pSecExprs, STableGroupInfo *pTableGroupInfo, SColumnInfo* pTagCols, bool stableQuery, char* sql, uint64_t *qId, int32_t vgId, SUdfInfo* pUdfInfo); int32_t initQInfo(STsBufInfo* pTsBufInfo, void* tsdb, void* sourceOptr, SQInfo* pQInfo, SQueryParam* param, char* start, int32_t prevResultLen, void* merger); diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 7bd181c5b3f5b733f941b4e545c8919b51c7720c..42ab37111b389faa5225181f63d8454ad94c1df3 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -7034,7 +7034,7 @@ FORCE_INLINE bool checkQIdEqual(void *qHandle, uint64_t qId) { SQInfo* createQInfoImpl(SQueryTableMsg* pQueryMsg, SSqlGroupbyExpr* pGroupbyExpr, SExprInfo* pExprs, SExprInfo* pSecExprs, STableGroupInfo* pTableGroupInfo, SColumnInfo* pTagCols, bool stableQuery, - char* sql, uint64_t *qId, SUdfInfo* pUdfInfo) { + char* sql, uint64_t *qId, int32_t vgId, SUdfInfo* pUdfInfo) { int16_t numOfCols = pQueryMsg->numOfCols; int16_t numOfOutput = pQueryMsg->numOfOutput; @@ -7070,6 +7070,7 @@ SQInfo* createQInfoImpl(SQueryTableMsg* pQueryMsg, SSqlGroupbyExpr* pGroupbyExpr pQueryAttr->prjInfo.vgroupLimit = pQueryMsg->vgroupLimit; pQueryAttr->prjInfo.ts = (pQueryMsg->order == TSDB_ORDER_ASC)? INT64_MIN:INT64_MAX; pQueryAttr->sw = pQueryMsg->sw; + pQueryAttr->vgId = vgId; pQueryAttr->stableQuery = pQueryMsg->stableQuery; pQueryAttr->topBotQuery = pQueryMsg->topBotQuery; diff --git a/src/query/src/queryMain.c b/src/query/src/queryMain.c index 562f7b8415fff12f646e8eb9c37613a45e4ebd45..2ad984add8b8f0d8aa56a2f7ee19b678e4e4307e 100644 --- a/src/query/src/queryMain.c +++ b/src/query/src/queryMain.c @@ -162,7 +162,7 @@ int32_t qCreateQueryInfo(void* tsdb, int32_t vgId, SQueryTableMsg* pQueryMsg, qi assert(pQueryMsg->stableQuery == isSTableQuery); (*pQInfo) = createQInfoImpl(pQueryMsg, param.pGroupbyExpr, param.pExprs, param.pSecExprs, &tableGroupInfo, - param.pTagColumnInfo, vgId, param.sql, qId, param.pUdfInfo); + param.pTagColumnInfo, isSTableQuery, param.sql, qId, vgId, param.pUdfInfo); if ((*pQInfo) == NULL) { code = TSDB_CODE_QRY_OUT_OF_MEMORY; diff --git a/tests/script/general/parser/testSuite.sim b/tests/script/general/parser/testSuite.sim index 6f32ed972f555cc8604c95acf3c4c91ff936571c..795050c21c5027063d749bee96b9037a82b441c3 100644 --- a/tests/script/general/parser/testSuite.sim +++ b/tests/script/general/parser/testSuite.sim @@ -1,54 +1,54 @@ -#run general/parser/alter.sim -#run general/parser/alter1.sim -#run general/parser/alter_stable.sim -#run general/parser/auto_create_tb.sim -#run general/parser/auto_create_tb_drop_tb.sim -#run general/parser/col_arithmetic_operation.sim -#run general/parser/columnValue.sim -#run general/parser/commit.sim -#run general/parser/create_db.sim -#run general/parser/create_mt.sim -#run general/parser/create_tb.sim -#run general/parser/dbtbnameValidate.sim -#run general/parser/fill.sim -#run general/parser/fill_stb.sim -##run general/parser/fill_us.sim # -#run general/parser/first_last.sim -#run general/parser/import_commit1.sim -#run general/parser/import_commit2.sim -#run general/parser/import_commit3.sim -#run general/parser/import_file.sim -#run general/parser/insert_tb.sim -#run general/parser/tags_dynamically_specifiy.sim -#run general/parser/interp.sim -#run general/parser/lastrow.sim -#run general/parser/limit.sim -#run general/parser/limit1.sim -#run general/parser/limit1_tblocks100.sim -#run general/parser/limit2.sim -#run general/parser/mixed_blocks.sim -#run general/parser/nchar.sim -#run general/parser/null_char.sim -#run general/parser/selectResNum.sim -#run general/parser/select_across_vnodes.sim -#run general/parser/select_from_cache_disk.sim -#run general/parser/set_tag_vals.sim -#run general/parser/single_row_in_tb.sim -#run general/parser/slimit.sim -#run general/parser/slimit1.sim -#run general/parser/slimit_alter_tags.sim -#run general/parser/tbnameIn.sim -#run general/parser/join.sim -#run general/parser/join_multivnode.sim -#run general/parser/join_manyblocks.sim -#run general/parser/projection_limit_offset.sim -#run general/parser/select_with_tags.sim -#run general/parser/select_distinct_tag.sim -#run general/parser/groupby.sim -#run general/parser/tags_filter.sim -#run general/parser/topbot.sim -#run general/parser/union.sim -#run general/parser/constCol.sim +run general/parser/alter.sim +run general/parser/alter1.sim +run general/parser/alter_stable.sim +run general/parser/auto_create_tb.sim +run general/parser/auto_create_tb_drop_tb.sim +run general/parser/col_arithmetic_operation.sim +run general/parser/columnValue.sim +run general/parser/commit.sim +run general/parser/create_db.sim +run general/parser/create_mt.sim +run general/parser/create_tb.sim +run general/parser/dbtbnameValidate.sim +run general/parser/fill.sim +run general/parser/fill_stb.sim +#run general/parser/fill_us.sim # +run general/parser/first_last.sim +run general/parser/import_commit1.sim +run general/parser/import_commit2.sim +run general/parser/import_commit3.sim +run general/parser/import_file.sim +run general/parser/insert_tb.sim +run general/parser/tags_dynamically_specifiy.sim +run general/parser/interp.sim +run general/parser/lastrow.sim +run general/parser/limit.sim +run general/parser/limit1.sim +run general/parser/limit1_tblocks100.sim +run general/parser/limit2.sim +run general/parser/mixed_blocks.sim +run general/parser/nchar.sim +run general/parser/null_char.sim +run general/parser/selectResNum.sim +run general/parser/select_across_vnodes.sim +run general/parser/select_from_cache_disk.sim +run general/parser/set_tag_vals.sim +run general/parser/single_row_in_tb.sim +run general/parser/slimit.sim +run general/parser/slimit1.sim +run general/parser/slimit_alter_tags.sim +run general/parser/tbnameIn.sim +run general/parser/join.sim +run general/parser/join_multivnode.sim +run general/parser/join_manyblocks.sim +run general/parser/projection_limit_offset.sim +run general/parser/select_with_tags.sim +run general/parser/select_distinct_tag.sim +run general/parser/groupby.sim +run general/parser/tags_filter.sim +run general/parser/topbot.sim +run general/parser/union.sim +run general/parser/constCol.sim run general/parser/where.sim run general/parser/timestamp.sim run general/parser/sliding.sim