提交 28855b81 编写于 作者: G Ganlin Zhao

fix(query): fix scalar function input is constant return var type value...

fix(query): fix scalar function input is constant return var type value contains illegal characters.

TD-15116
上级 8c36142a
......@@ -517,10 +517,8 @@ EDealRes sclRewriteFunction(SNode** pNode, SScalarCtx *ctx) {
res->node.resType = node->node.resType;
int32_t type = output.columnData->info.type;
if (IS_VAR_DATA_TYPE(type)) {
size_t tLen = varDataLen(output.columnData->pData);
ASSERT(tLen <= res->node.resType.bytes);
res->datum.p = taosMemoryCalloc(res->node.resType.bytes + VARSTR_HEADER_SIZE + 1, 1);
memcpy(res->datum.p, output.columnData->pData, tLen);
memcpy(res->datum.p, output.columnData->pData, varDataTLen(output.columnData->pData));
} else {
memcpy(nodesGetValueFromNode(res), output.columnData->pData, tDataTypes[type].bytes);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册