New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: optimize partition node, replace with sort node #22629
Conversation
ee9b9cf
to
dc77d93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 生成group key列表的值效率不太高,目前是先拷贝到中间数组再拷贝到最终keyBuf中,可以一步完成或者直接比较各列的值不拷贝;
- 根据我们目前的使用方式,group key列表比如等于sort key列表或者是sort key列表的子集,因此计划中不需要传递group key的详细信息,只需要指示group key等于sort key或者是group key是sort key中的前几列即可,这样算子中也不需要重新建立group key的相关信息。
if (!pGroupIdCalc->lastKeyBuf) code = TSDB_CODE_OUT_OF_MEMORY; | ||
} | ||
if (TSDB_CODE_SUCCESS == code) { | ||
pInfo->pGroupIdCalc = pGroupIdCalc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pGroupIdCalc内存泄漏
dc77d93
to
72335c7
Compare
217c0ce
to
e3d78ab
Compare
|
||
int32_t blockDataGetSortedRows(SSDataBlock* pDataBlock, SArray* pOrderInfo) { | ||
if (!pDataBlock || !pOrderInfo) return 0; | ||
for (int32_t i = 0; i < taosArrayGetSize(pOrderInfo); ++i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是因为目前只有一列吗,要不这个逻辑就不对了吧
if (!pOrder) { | ||
code = TSDB_CODE_OUT_OF_MEMORY; | ||
} else { | ||
pSort->excludePkCol = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果已经存在primary ts列,可以不加新列,excluedPkCol也不需要了
@@ -34,6 +34,7 @@ | |||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_time.py -Q 4 | |||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/nestedQuery_26.py -Q 4 | |||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/interval_limit_opt.py -Q 4 | |||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/partition_by_col.py -Q 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我们有几种查询policy,-Q 4只是其中一种,加一个新文件应该是类似这样加:
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 2
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 3
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/columnLenUpdated.py -Q 4
9ceebeb
to
12ffdbd
Compare
12ffdbd
to
cb78c54
Compare
No description provided.