提交 812e92ba 编写于 作者: K kailixu

chore: code optimization for row/column support 64k

上级 48abc2c4
......@@ -207,7 +207,6 @@ do { \
#define TSDB_ACCT_ID_LEN 11
#define TSDB_MAX_COLUMNS 4096
#define TSDB_MIN_COLUMNS 2 //PRIMARY COLUMN(timestamp) + other columns
#define TSDB_NODE_NAME_LEN 64
......@@ -227,13 +226,12 @@ do { \
#define TSDB_APPNAME_LEN TSDB_UNI_LEN
/**
* uint16_t (0~65535) is used to store the row len, and SDataRow contains 4 bits header.
* history: 49151->65531
* uint16_t (0~65535) is used to store the row length, and SDataRow contains 4 bits header.
* history value: 49151:65531
*/
#define TSDB_MAX_BYTES_PER_ROW 65531
#define TSDB_MAX_TAGS_LEN 16384
#define TSDB_MAX_JSON_TAGS_LEN (4096 * TSDB_NCHAR_SIZE + 2 + 1) // 2->var_header_len 1->type
#define TSDB_MAX_JSON_TAGS_LEN (4096*TSDB_NCHAR_SIZE + 2 + 1) // 2->var_header_len 1->type
#define TSDB_MAX_TAGS 128
#define TSDB_MAX_TAG_CONDITIONS 1024
#define TSDB_MAX_JSON_KEY_LEN 256
......@@ -248,7 +246,7 @@ do { \
#define TSDB_CLUSTER_ID_LEN 40
#define TSDB_FQDN_LEN 128
#define TSDB_EP_LEN (TSDB_FQDN_LEN + 6)
#define TSDB_EP_LEN (TSDB_FQDN_LEN+6)
#define TSDB_IPv4ADDR_LEN 16
#define TSDB_FILENAME_LEN 128
#define TSDB_SHOW_SQL_LEN 512
......@@ -261,7 +259,7 @@ do { \
#define TSDB_DB_TYPE_DEFAULT 0
#define TSDB_DB_TYPE_TOPIC 1
#define TSDB_DEFAULT_PKT_SIZE 65480 // same as RPC_MAX_UDP_SIZE
#define TSDB_DEFAULT_PKT_SIZE 65480 //same as RPC_MAX_UDP_SIZE
#define TSDB_PAYLOAD_SIZE TSDB_DEFAULT_PKT_SIZE
#define TSDB_DEFAULT_PAYLOAD_SIZE 5120 // default payload size, greater than PATH_MAX value
......@@ -374,7 +372,6 @@ do { \
#define TSDB_MAX_FIELD_LEN 65519
#define TSDB_MAX_BINARY_LEN TSDB_MAX_FIELD_LEN // 16384:65519
#define TSDB_MAX_NCHAR_LEN TSDB_MAX_FIELD_LEN // 16384:65519
#define PRIMARYKEY_TIMESTAMP_COL_INDEX 0
#define TSDB_MAX_RPC_THREADS 5
......
......@@ -489,8 +489,7 @@ int WCSPatternMatch(const uint32_t *patterStr, const uint32_t *str, size_t size,
int32_t compareStrPatternComp(const void* pLeft, const void* pRight) {
SPatternCompareInfo pInfo = {'%', '_'};
// assert(varDataLen(pRight) <= TSDB_MAX_FIELD_LEN);
assert(varDataLen(pRight) <= TSDB_MAX_NCHAR_LEN);
ASSERT(varDataTLen(pRight) <= TSDB_MAX_BINARY_LEN);
char *pattern = calloc(varDataLen(pRight) + 1, sizeof(char));
memcpy(pattern, varDataVal(pRight), varDataLen(pRight));
......@@ -572,7 +571,6 @@ int32_t compareWStrPatternComp(const void* pLeft, const void* pRight) {
SPatternCompareInfo pInfo = {'%', '_'};
size_t size = varDataLen(pLeft)/TSDB_NCHAR_SIZE;
// assert(varDataLen(pRight) <= TSDB_MAX_FIELD_LEN * TSDB_NCHAR_SIZE);
ASSERT(varDataTLen(pRight) <= TSDB_MAX_NCHAR_LEN);
char *pattern = calloc(varDataLen(pRight) + TSDB_NCHAR_SIZE, 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册