From cc660de9d0ec8160c69b5e1193c7798c39ec3371 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 3 Apr 2024 08:14:30 +0800 Subject: [PATCH] chore: error prompt for null primary key column --- source/libs/executor/src/dataInserter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/libs/executor/src/dataInserter.c b/source/libs/executor/src/dataInserter.c index 2d481bd273..dfe30c9f96 100644 --- a/source/libs/executor/src/dataInserter.c +++ b/source/libs/executor/src/dataInserter.c @@ -218,7 +218,7 @@ int32_t buildSubmitReqFromBlock(SDataInserterHandle* pInserter, SSubmitReq2** pp ASSERT(pColInfoData->info.type == pCol->type); if (colDataIsNull_s(pColInfoData, j)) { if ((pCol->flags & COL_IS_KEY)) { - qError("NULL value for primary key, colId:%" PRIi16 ", colType:%" PRIi8, pCol->colId, pCol->type); + qError("Primary key column should not be null, colId:%" PRIi16 ", colType:%" PRIi8, pCol->colId, pCol->type); terrno = TSDB_CODE_PAR_PRIMARY_KEY_IS_NULL; goto _end; } @@ -245,12 +245,12 @@ int32_t buildSubmitReqFromBlock(SDataInserterHandle* pInserter, SSubmitReq2** pp if (pColInfoData->info.type < TSDB_DATA_TYPE_MAX && pColInfoData->info.type > TSDB_DATA_TYPE_NULL) { if (colDataIsNull_s(pColInfoData, j)) { if (PRIMARYKEY_TIMESTAMP_COL_ID == pCol->colId) { - qError("NULL value for primary timestamp key"); + qError("Primary timestamp column should not be null"); terrno = TSDB_CODE_PAR_INCORRECT_TIMESTAMP_VAL; goto _end; } if ((pCol->flags & COL_IS_KEY)) { - qError("NULL value for primary key, colId:%" PRIi16 ", colType:%" PRIi8, pCol->colId, pCol->type); + qError("Primary key column should not be null, colId:%" PRIi16 ", colType:%" PRIi8, pCol->colId, pCol->type); terrno = TSDB_CODE_PAR_PRIMARY_KEY_IS_NULL; goto _end; }