rm unused

This commit is contained in:
Bob Liu 2023-11-20 19:25:31 +08:00
parent ffc952e31e
commit 146c36b0ad
2 changed files with 1 additions and 8 deletions

View File

@ -17,7 +17,6 @@
#include "dmMgmt.h" #include "dmMgmt.h"
#include "audit.h" #include "audit.h"
#include "libs/function/tudf.h" #include "libs/function/tudf.h"
#include "nodes.h"
#define DM_INIT_AUDIT() \ #define DM_INIT_AUDIT() \
do { \ do { \

View File

@ -46,7 +46,6 @@ typedef struct SBuiltinNodeDefinition {
SBuiltinNodeDefinition funcNodes[QUERY_NODE_END] = {NULL}; SBuiltinNodeDefinition funcNodes[QUERY_NODE_END] = {NULL};
static TdThreadOnce functionNodeInit = PTHREAD_ONCE_INIT; static TdThreadOnce functionNodeInit = PTHREAD_ONCE_INIT;
volatile int32_t initNodeCode = -1;
static void setFunc(const char* name, int32_t type, int32_t nodeSize, FExecNodeToJson toJsonFunc, static void setFunc(const char* name, int32_t type, int32_t nodeSize, FExecNodeToJson toJsonFunc,
@ -65,7 +64,7 @@ bool funcArrayCheck(int32_t type) {
nodesError("funcArrayCheck out of range type = %d", type); nodesError("funcArrayCheck out of range type = %d", type);
return false; return false;
} }
// only init once, do nothing when initNodeCode == 0 // only init once, do nothing when run funcArrayCheck again
taosThreadOnce(&functionNodeInit, doInitNodeFuncArray); taosThreadOnce(&functionNodeInit, doInitNodeFuncArray);
if (!funcNodes[type].name) { if (!funcNodes[type].name) {
@ -7437,10 +7436,6 @@ void nodesDestroyNode(SNode* pNode) {
// clang-format off // clang-format off
static void doInitNodeFuncArray() { static void doInitNodeFuncArray() {
if (initNodeCode == 0) {
return;
}
setFunc("Column", setFunc("Column",
QUERY_NODE_COLUMN, QUERY_NODE_COLUMN,
sizeof(SColumnNode), sizeof(SColumnNode),
@ -8848,7 +8843,6 @@ static void doInitNodeFuncArray() {
jsonToPhysiHashJoinNode, jsonToPhysiHashJoinNode,
destoryHashJoinPhysiNode destoryHashJoinPhysiNode
); );
initNodeCode = 0;
} }
// clang-format on // clang-format on