提交 9dcaa53e 编写于 作者: K kailixu

code optimization

上级 e6534051
...@@ -685,8 +685,8 @@ static int32_t tsParseOneColumnKV(SSchema *pSchema, SStrToken *pToken, char *pay ...@@ -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 { \ ...@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册