提交 bb641cf2 编写于 作者: wmmhello's avatar wmmhello

[TD-14342]<fix> fix error if nchar condition in subquery like "select * from...

[TD-14342]<fix> fix error if nchar condition in subquery like "select * from (select * from table) where nchar = '0'"
上级 e433834f
......@@ -3609,16 +3609,11 @@ int32_t filterConverNcharColumns(SFilterInfo* info, int32_t rows, bool *gotNchar
for (int32_t j = 0; j < rows; ++j) {
char *src = FILTER_GET_COL_FIELD_DATA(fi, j);
char *dst = FILTER_GET_COL_FIELD_DATA(&nfi, j);
int32_t len = 0;
char *varSrc = varDataVal(src);
size_t k = 0, varSrcLen = varDataLen(src);
while (k < varSrcLen && varSrc[k++] == -1) {}
if (k == varSrcLen) {
/* NULL */
varDataLen(dst) = (VarDataLenT) varSrcLen;
if(isNull(src, TSDB_DATA_TYPE_NCHAR)){
varDataCopy(dst, src);
continue;
}
int32_t len = 0;
bool ret = taosMbsToUcs4(varDataVal(src), varDataLen(src), varDataVal(dst), bufSize, &len);
if(!ret) {
qError("filterConverNcharColumns taosMbsToUcs4 error");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册