diff --git a/docs/examples/go/go.mod b/docs/examples/go/go.mod index b0f6fbcd50d54c232c322ec23621d389f8a1f46d..2193184e6922bcdce0487d2ee09e2f1c9f4074a9 100644 --- a/docs/examples/go/go.mod +++ b/docs/examples/go/go.mod @@ -2,4 +2,4 @@ module goexample go 1.17 -require github.com/taosdata/driver-go/v2 latest +require github.com/taosdata/driver-go/v2 v2.0.5 diff --git a/src/common/src/tdataformat.c b/src/common/src/tdataformat.c index 4786700f97ab488e33df81810f3f061b5bb67111..adf8765c230e163fbd8788033b80330913540770 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; } @@ -510,7 +514,11 @@ static void tdAppendKvRowToDataCol(SKVRow row, STSchema *pSchema, SDataCols *pCo while (dcol < pCols->numOfCols) { SDataCol *pDataCol = &(pCols->cols[dcol]); if (rcol >= nRowCols || 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; }