fix(query): set correct timeunit.

This commit is contained in:
Haojun Liao 2022-06-15 18:13:43 +08:00
parent c8ea9c8753
commit b9e98b42cd
1 changed files with 1 additions and 1 deletions

View File

@ -3410,7 +3410,7 @@ bool elapsedFunctionSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResultInfo
pInfo->min = MAX_TS_KEY;
pInfo->max = 0;
if (pCtx->numOfParams == 2) {
if (pCtx->numOfParams > 2) {
pInfo->timeUnit = pCtx->param[1].param.i;
} else {
pInfo->timeUnit = 1;