code optimization
This commit is contained in:
parent
e65340519e
commit
9dcaa53e12
|
@ -685,8 +685,8 @@ static int32_t tsParseOneColumnKV(SSchema *pSchema, SStrToken *pToken, char *pay
|
||||||
if (pToken->type == TK_NULL) {
|
if (pToken->type == TK_NULL) {
|
||||||
payloadColSetId(payload, pSchema->colId);
|
payloadColSetId(payload, pSchema->colId);
|
||||||
payloadColSetType(payload, pSchema->type);
|
payloadColSetType(payload, pSchema->type);
|
||||||
memcpy(POINTER_SHIFT(payloadStart,tOffset), tdGetNullVal(TSDB_DATA_TYPE_NCHAR), VARSTR_HEADER_SIZE + INT_BYTES);
|
memcpy(POINTER_SHIFT(payloadStart,tOffset), tdGetNullVal(TSDB_DATA_TYPE_NCHAR), VARSTR_HEADER_SIZE + TSDB_NCHAR_SIZE);
|
||||||
*sizeAppend = (TDRowLenT)(VARSTR_HEADER_SIZE + INT_BYTES);
|
*sizeAppend = (TDRowLenT)(VARSTR_HEADER_SIZE + TSDB_NCHAR_SIZE);
|
||||||
} else {
|
} else {
|
||||||
// if the converted output len is over than pColumnModel->bytes, return error: 'Argument list too long'
|
// if the converted output len is over than pColumnModel->bytes, return error: 'Argument list too long'
|
||||||
int32_t output = 0;
|
int32_t output = 0;
|
||||||
|
|
|
@ -199,9 +199,9 @@ do { \
|
||||||
* In some scenarios uint16_t (0~65535) is used to store the row len.
|
* In some scenarios uint16_t (0~65535) is used to store the row len.
|
||||||
* - Firstly, we use 65531(65535 - 4), as the SDataRow and SKVRow including 4 bits header.
|
* - Firstly, we use 65531(65535 - 4), as the SDataRow and SKVRow including 4 bits header.
|
||||||
* - Secondly, if all cols are VarType except primary key, we need 4 bits to store the offset, thus
|
* - Secondly, if all cols are VarType except primary key, we need 4 bits to store the offset, thus
|
||||||
* the final value is 65531-8-4095*4 = 49143.
|
* the final value is 65531-(4096-1)*4 = 49151.
|
||||||
*/
|
*/
|
||||||
#define TSDB_MAX_BYTES_PER_ROW 49143
|
#define TSDB_MAX_BYTES_PER_ROW 49151
|
||||||
#define TSDB_MAX_TAGS_LEN 16384
|
#define TSDB_MAX_TAGS_LEN 16384
|
||||||
#define TSDB_MAX_TAGS 128
|
#define TSDB_MAX_TAGS 128
|
||||||
#define TSDB_MAX_TAG_CONDITIONS 1024
|
#define TSDB_MAX_TAG_CONDITIONS 1024
|
||||||
|
|
Loading…
Reference in New Issue