From fdfb7b58f10addd58b70408f66ffc4b0dd6c739a Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 27 Apr 2021 17:18:39 +0800 Subject: [PATCH] [td-225] merge develop --- src/query/inc/qExecutor.h | 2 +- src/query/src/qExecutor.c | 3 +- src/query/src/queryMain.c | 2 +- tests/script/general/parser/testSuite.sim | 102 +++++++++++----------- 4 files changed, 55 insertions(+), 54 deletions(-) diff --git a/src/query/inc/qExecutor.h b/src/query/inc/qExecutor.h index 5c8ac615f9..821305c607 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 7bd181c5b3..42ab37111b 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 562f7b8415..2ad984add8 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 6f32ed972f..795050c21c 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 -- GitLab