提交 1d13c712 编写于 作者: X Xiaoyu Wang

fix: some problems of parser and planner

上级 d5d25253
...@@ -5303,7 +5303,10 @@ static int32_t createCastFuncForTag(STranslateContext* pCxt, SNode* pNode, SData ...@@ -5303,7 +5303,10 @@ static int32_t createCastFuncForTag(STranslateContext* pCxt, SNode* pNode, SData
if (NULL == pExpr) { if (NULL == pExpr) {
return TSDB_CODE_OUT_OF_MEMORY; return TSDB_CODE_OUT_OF_MEMORY;
} }
int32_t code = createCastFunc(pCxt, pExpr, dt, pCast); int32_t code = translateExpr(pCxt, &pExpr);
if (TSDB_CODE_SUCCESS == code) {
code = createCastFunc(pCxt, pExpr, dt, pCast);
}
if (TSDB_CODE_SUCCESS != code) { if (TSDB_CODE_SUCCESS != code) {
nodesDestroyNode(pExpr); nodesDestroyNode(pExpr);
} }
...@@ -5314,10 +5317,7 @@ static int32_t createTagVal(STranslateContext* pCxt, uint8_t precision, SSchema* ...@@ -5314,10 +5317,7 @@ static int32_t createTagVal(STranslateContext* pCxt, uint8_t precision, SSchema*
SValueNode** pVal) { SValueNode** pVal) {
SNode* pCast = NULL; SNode* pCast = NULL;
int32_t code = createCastFuncForTag(pCxt, pNode, schemaToDataType(precision, pSchema), &pCast); int32_t code = createCastFuncForTag(pCxt, pNode, schemaToDataType(precision, pSchema), &pCast);
if (TSDB_CODE_SUCCESS == code) { SNode* pNew = NULL;
code = translateExpr(pCxt, &pCast);
}
SNode* pNew = NULL;
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
code = scalarCalculateConstants(pCast, &pNew); code = scalarCalculateConstants(pCast, &pNew);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册