From 855a76813ce1f84b3a870e0b4366a031c75cefc2 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Mon, 9 Aug 2021 04:00:07 +0800 Subject: [PATCH] fix merge --- src/common/src/tdataformat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/src/tdataformat.c b/src/common/src/tdataformat.c index b62c97bc2a..3b48bf9977 100644 --- a/src/common/src/tdataformat.c +++ b/src/common/src/tdataformat.c @@ -587,12 +587,12 @@ static void tdMergeTwoDataCols(SDataCols *target, SDataCols *src1, int *iter1, i if ((key1 > key2) || (key1 == key2 && !TKEY_IS_DELETED(tkey2))) { for (int i = 0; i < src2->numOfCols; i++) { ASSERT(target->cols[i].type == src2->cols[i].type); - if(!forceSetNull && (isAllRowsNull(&src2->cols[i]) || isNull(src2->cols[i].pData, src2->cols[i].type)) && key1 == key2) { - dataColAppendVal(&(target->cols[i]), tdGetColDataOfRow(src1->cols + i, *iter1), target->numOfRows, - target->maxPoints); - } else if (src2->cols[i].len > 0) { + if (src2->cols[i].len > 0 && !isNull(src2->cols[i].pData, src2->cols[i].type)) { dataColAppendVal(&(target->cols[i]), tdGetColDataOfRow(src2->cols + i, *iter2), target->numOfRows, target->maxPoints); + } else if(!forceSetNull && key1 == key2 && src1->cols[i].len > 0) { + dataColAppendVal(&(target->cols[i]), tdGetColDataOfRow(src1->cols + i, *iter1), target->numOfRows, + target->maxPoints); } } target->numOfRows++; -- GitLab