fix: plan problem when functions that requires a timeline is used in a partition by query

This commit is contained in:
Xiaoyu Wang 2022-07-22 20:29:52 +08:00
parent 241b385653
commit 27c71155cc
1 changed files with 2 additions and 2 deletions

View File

@ -3880,11 +3880,11 @@ int32_t elapsedFunction(SqlFunctionCtx* pCtx) {
if (pCtx->end.key != INT64_MIN) { if (pCtx->end.key != INT64_MIN) {
pInfo->min = pCtx->end.key; pInfo->min = pCtx->end.key;
} else { } else {
pInfo->min = ptsList[0]; pInfo->min = ptsList[start];
} }
} else { } else {
if (pCtx->start.key == INT64_MIN) { if (pCtx->start.key == INT64_MIN) {
pInfo->min = (pInfo->min > ptsList[0]) ? ptsList[0] : pInfo->min; pInfo->min = (pInfo->min > ptsList[start]) ? ptsList[start] : pInfo->min;
} else { } else {
pInfo->min = pCtx->start.key; pInfo->min = pCtx->start.key;
} }