From 5db041dc269f18d75b6994cdab680e552650b533 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 29 Dec 2022 10:15:13 +0800 Subject: [PATCH] enh: force set null optimization for datarow --- src/common/src/tdataformat.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/src/tdataformat.c b/src/common/src/tdataformat.c index 4c9089f0b8..80463ab550 100644 --- a/src/common/src/tdataformat.c +++ b/src/common/src/tdataformat.c @@ -467,7 +467,11 @@ static void tdAppendDataRowToDataCol(SDataRow row, STSchema *pSchema, SDataCols while (dcol < pCols->numOfCols) { SDataCol *pDataCol = &(pCols->cols[dcol]); if (rcol >= schemaNCols(pSchema)) { - dataColAppendVal(pDataCol, getNullValue(pDataCol->type), pCols->numOfRows, pCols->maxPoints, rowOffset); + if (forceSetNull) { + dataColAppendVal(pDataCol, getNullValue(pDataCol->type), pCols->numOfRows, pCols->maxPoints, rowOffset); + } else { + break; + } dcol++; continue; } -- GitLab