fix(query): check the primary timestamp null case and report error with inforamtion to caller.

This commit is contained in:
Haojun Liao 2022-04-19 13:47:40 +08:00
parent a036d2f3ff
commit 0787021ca0
1 changed files with 1 additions and 2 deletions

View File

@ -460,8 +460,7 @@ static int32_t parseValueToken(char** end, SToken* pToken, SSchema* pSchema, int
if (isNullStr(pToken)) {
if (TSDB_DATA_TYPE_TIMESTAMP == pSchema->type && PRIMARYKEY_TIMESTAMP_COL_ID == pSchema->colId) {
int64_t tmpVal = 0;
return func(pMsgBuf, &tmpVal, pSchema->bytes, param);
return buildSyntaxErrMsg(pMsgBuf, "primary timestamp can not be null", pToken->z);
}
return func(pMsgBuf, NULL, 0, param);