提交 40228a00 编写于 作者: X Xiaoyu Wang

TD-14043 show statement bugfix

上级 98a5e285
......@@ -111,6 +111,10 @@ static SNode* valueNodeCopy(const SValueNode* pSrc, SValueNode* pDst) {
exprNodeCopy((const SExprNode*)pSrc, (SExprNode*)pDst);
COPY_CHAR_POINT_FIELD(literal);
COPY_SCALAR_FIELD(isDuration);
COPY_SCALAR_FIELD(translate);
if (!pSrc->translate) {
return (SNode*)pDst;
}
switch (pSrc->node.resType.type) {
case TSDB_DATA_TYPE_NULL:
break;
......@@ -137,7 +141,12 @@ static SNode* valueNodeCopy(const SValueNode* pSrc, SValueNode* pDst) {
case TSDB_DATA_TYPE_NCHAR:
case TSDB_DATA_TYPE_VARCHAR:
case TSDB_DATA_TYPE_VARBINARY:
COPY_CHAR_POINT_FIELD(datum.p);
pDst->datum.p = malloc(pSrc->node.resType.bytes + VARSTR_HEADER_SIZE);
if (NULL == pDst->datum.p) {
nodesDestroyNode(pDst);
return NULL;
}
memcpy(pDst->datum.p, pSrc->datum.p, pSrc->node.resType.bytes + VARSTR_HEADER_SIZE);
break;
case TSDB_DATA_TYPE_JSON:
case TSDB_DATA_TYPE_DECIMAL:
......
......@@ -1374,7 +1374,7 @@ static int32_t createOperatorNode(EOperatorType opType, const char* pColName, SN
return TSDB_CODE_OUT_OF_MEMORY;
}
pOper->opType = OP_TYPE_LIKE;
pOper->opType = opType;
pOper->pLeft = nodesMakeNode(QUERY_NODE_COLUMN);
pOper->pRight = nodesCloneNode(pRight);
if (NULL == pOper->pLeft || NULL == pOper->pRight) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册