提交 fc3df941 编写于 作者: X Xiaoyu Wang

fix: some problems of udf and 'create table'

上级 ba509423
...@@ -486,7 +486,7 @@ _return: ...@@ -486,7 +486,7 @@ _return:
EDealRes sclRewriteFunction(SNode** pNode, SScalarCtx *ctx) { EDealRes sclRewriteFunction(SNode** pNode, SScalarCtx *ctx) {
SFunctionNode *node = (SFunctionNode *)*pNode; SFunctionNode *node = (SFunctionNode *)*pNode;
SNode* tnode = NULL; SNode* tnode = NULL;
if (fmIsUserDefinedFunc(node->funcId)) { if (!fmIsScalarFunc(node->funcId)) {
return DEAL_RES_CONTINUE; return DEAL_RES_CONTINUE;
} }
...@@ -616,10 +616,6 @@ EDealRes sclRewriteOperator(SNode** pNode, SScalarCtx *ctx) { ...@@ -616,10 +616,6 @@ EDealRes sclRewriteOperator(SNode** pNode, SScalarCtx *ctx) {
} }
EDealRes sclConstantsRewriter(SNode** pNode, void* pContext) { EDealRes sclConstantsRewriter(SNode** pNode, void* pContext) {
if (QUERY_NODE_VALUE == nodeType(*pNode) || QUERY_NODE_COLUMN == nodeType(*pNode) || QUERY_NODE_NODE_LIST == nodeType(*pNode)) {
return DEAL_RES_CONTINUE;
}
SScalarCtx *ctx = (SScalarCtx *)pContext; SScalarCtx *ctx = (SScalarCtx *)pContext;
if (QUERY_NODE_FUNCTION == nodeType(*pNode)) { if (QUERY_NODE_FUNCTION == nodeType(*pNode)) {
...@@ -634,9 +630,7 @@ EDealRes sclConstantsRewriter(SNode** pNode, void* pContext) { ...@@ -634,9 +630,7 @@ EDealRes sclConstantsRewriter(SNode** pNode, void* pContext) {
return sclRewriteOperator(pNode, ctx); return sclRewriteOperator(pNode, ctx);
} }
sclError("invalid node type for calculating constants, type:%d", nodeType(*pNode)); return DEAL_RES_CONTINUE;
ctx->code = TSDB_CODE_QRY_INVALID_INPUT;
return DEAL_RES_ERROR;
} }
EDealRes sclWalkFunction(SNode* pNode, SScalarCtx *ctx) { EDealRes sclWalkFunction(SNode* pNode, SScalarCtx *ctx) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册