feat: add time range list for auto compact

This commit is contained in:
kailixu 2024-12-03 17:51:41 +08:00
parent 3e816658af
commit 92471c5834
3 changed files with 8 additions and 10 deletions

View File

@ -19,7 +19,7 @@
extern int32_t tsdbOpenCompMonitor(STsdb *tsdb); extern int32_t tsdbOpenCompMonitor(STsdb *tsdb);
extern void tsdbCloseCompMonitor(STsdb *tsdb); extern void tsdbCloseCompMonitor(STsdb *tsdb);
extern int32_t tsdbInitCompact(); extern int32_t tsdbInitCompact();
extern void tsdbClearnupCompact(); extern void tsdbCleanupCompact();
int32_t tsdbInit() { int32_t tsdbInit() {
#ifdef TD_ENTERPRISE #ifdef TD_ENTERPRISE
@ -30,7 +30,7 @@ int32_t tsdbInit() {
void tsdbCleanUp() { void tsdbCleanUp() {
#ifdef TD_ENTERPRISE #ifdef TD_ENTERPRISE
tsdbClearnupCompact(); tsdbCleanupCompact();
#endif #endif
return; return;
} }

View File

@ -470,11 +470,9 @@ int32_t nodesMakeNode(ENodeType type, SNode** ppNodeOut) {
case QUERY_NODE_SET_OPERATOR: case QUERY_NODE_SET_OPERATOR:
code = makeNode(type, sizeof(SSetOperator), &pNode); code = makeNode(type, sizeof(SSetOperator), &pNode);
break; break;
<<<<<<< HEAD
=======
case QUERY_NODE_RANGE_AROUND: case QUERY_NODE_RANGE_AROUND:
code = makeNode(type, sizeof(SRangeAroundNode), &pNode); break; code = makeNode(type, sizeof(SRangeAroundNode), &pNode);
>>>>>>> feat/TS-4994-3.0 break;
case QUERY_NODE_SELECT_STMT: case QUERY_NODE_SELECT_STMT:
code = makeNode(type, sizeof(SSelectStmt), &pNode); code = makeNode(type, sizeof(SSelectStmt), &pNode);
break; break;

View File

@ -342,8 +342,8 @@ integer_list(A) ::= integer_list(B) NK_COMMA NK_INTEGER(C).
%type signed_integer_list { SNodeList* } %type signed_integer_list { SNodeList* }
%destructor signed_integer_list { nodesDestroyList($$); } %destructor signed_integer_list { nodesDestroyList($$); }
signed_integer_list(A) ::= signed_integer(B). { A = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &B)); } signed_integer_list(A) ::= signed_integer(B). { A = createNodeList(pCxt, B); }
signed_integer_list(A) ::= signed_integer_list(B) NK_COMMA signed_integer(C). { A = addNodeToList(pCxt, B, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &C)); } signed_integer_list(A) ::= signed_integer_list(B) NK_COMMA signed_integer(C). { A = addNodeToList(pCxt, B, C); }
%type variable_list { SNodeList* } %type variable_list { SNodeList* }
%destructor variable_list { nodesDestroyList($$); } %destructor variable_list { nodesDestroyList($$); }
@ -352,8 +352,8 @@ variable_list(A) ::= variable_list(B) NK_COMMA NK_VARIABLE(C).
%type signed_variable_list { SNodeList* } %type signed_variable_list { SNodeList* }
%destructor signed_variable_list { nodesDestroyList($$); } %destructor signed_variable_list { nodesDestroyList($$); }
signed_variable_list(A) ::= NK_VARIABLE(B). { A = createNodeList(pCxt, createDurationValueNode(pCxt, &B)); } signed_variable_list(A) ::= signed_variable(B). { A = createNodeList(pCxt, releaseRawExprNode(pCxt, B)); }
signed_variable_list(A) ::= variable_list(B) NK_COMMA NK_VARIABLE(C). { A = addNodeToList(pCxt, B, createDurationValueNode(pCxt, &C)); } signed_variable_list(A) ::= signed_variable_list(B) NK_COMMA signed_variable(C). { A = addNodeToList(pCxt, B, releaseRawExprNode(pCxt, C)); }
%type retention_list { SNodeList* } %type retention_list { SNodeList* }
%destructor retention_list { nodesDestroyList($$); } %destructor retention_list { nodesDestroyList($$); }