fix crash

This commit is contained in:
Ganlin Zhao 2023-04-13 15:50:30 +08:00
parent 7414f28d17
commit b51477343d
1 changed files with 5 additions and 0 deletions

View File

@ -1543,6 +1543,11 @@ static int32_t translateDateTimeFunc(STranslateContext* pCxt, SFunctionNode* pFu
if (!fmIsDateTimeFunc(pFunc->funcId)) { if (!fmIsDateTimeFunc(pFunc->funcId)) {
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }
if (!isSelectStmt(pCxt->pCurrStmt)) {
return TSDB_CODE_SUCCESS;
}
SSelectStmt* pSelect = (SSelectStmt*)pCxt->pCurrStmt; SSelectStmt* pSelect = (SSelectStmt*)pCxt->pCurrStmt;
pFunc->node.resType.precision = pSelect->precision; pFunc->node.resType.precision = pSelect->precision;