diff --git a/include/nodes/nodes.h b/include/nodes/nodes.h index e6b41adf146a8a9e6881c8644398b150246e8ab1..a9ca769042f626abb6d7dae441875f3da02f32f8 100644 --- a/include/nodes/nodes.h +++ b/include/nodes/nodes.h @@ -249,20 +249,20 @@ typedef struct SSetOperator { typedef bool (*FQueryNodeWalker)(SNode* pNode, void* pContext); -bool nodeArrayWalker(SArray* pArray, FQueryNodeWalker walker, void* pContext); -bool nodeTreeWalker(SNode* pNode, FQueryNodeWalker walker, void* pContext); +bool nodesWalkArray(SArray* pArray, FQueryNodeWalker walker, void* pContext); +bool nodesWalkNode(SNode* pNode, FQueryNodeWalker walker, void* pContext); -bool stmtWalker(SNode* pNode, FQueryNodeWalker walker, void* pContext); +bool nodesWalkStmt(SNode* pNode, FQueryNodeWalker walker, void* pContext); -bool nodeEqual(const SNode* a, const SNode* b); +bool nodesEqualNode(const SNode* a, const SNode* b); -void cloneNode(const SNode* pNode); +void nodesCloneNode(const SNode* pNode); -int32_t nodeToString(const SNode* pNode, char** pStr, int32_t* pLen); -int32_t stringToNode(const char* pStr, SNode** pNode); +int32_t nodesNodeToString(const SNode* pNode, char** pStr, int32_t* pLen); +int32_t nodesStringToNode(const char* pStr, SNode** pNode); -bool isTimeorderQuery(const SNode* pQuery); -bool isTimelineQuery(const SNode* pQuery); +bool nodesIsTimeorderQuery(const SNode* pQuery); +bool nodesIsTimelineQuery(const SNode* pQuery); #ifdef __cplusplus } diff --git a/source/libs/parser/inc/new_sql.y b/source/libs/parser/inc/new_sql.y new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/source/libs/parser/src/astTranslate.c b/source/libs/parser/src/astTranslate.c new file mode 100644 index 0000000000000000000000000000000000000000..4c649e0ecce22376dd47ea905c3581cc9c12c378 --- /dev/null +++ b/source/libs/parser/src/astTranslate.c @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +int32_t doTranslate() { + +} diff --git a/source/nodes/src/nodesClone.c b/source/nodes/src/nodesCloneFuncs.c similarity index 93% rename from source/nodes/src/nodesClone.c rename to source/nodes/src/nodesCloneFuncs.c index 04f6df56234738188caafcf7c40972c62c6173fa..2d0a6483ae795b5e0c68d068ebf255d01af092b3 100644 --- a/source/nodes/src/nodesClone.c +++ b/source/nodes/src/nodesCloneFuncs.c @@ -15,6 +15,6 @@ #include "nodes.h" -void cloneNode(const SNode* pNode) { +void nodesCloneNode(const SNode* pNode) { } diff --git a/source/nodes/src/nodesCode.c b/source/nodes/src/nodesCodeFuncs.c similarity index 82% rename from source/nodes/src/nodesCode.c rename to source/nodes/src/nodesCodeFuncs.c index 7fe919ffe8219a84c84d2b51ce30225d0152d796..b31980d15009f0c7d097d7967c78e7722364b879 100644 --- a/source/nodes/src/nodesCode.c +++ b/source/nodes/src/nodesCodeFuncs.c @@ -15,10 +15,10 @@ #include "nodes.h" -int32_t nodeToString(const SNode* pNode, char** pStr, int32_t* pLen) { +int32_t nodesNodeToString(const SNode* pNode, char** pStr, int32_t* pLen) { } -int32_t stringToNode(const char* pStr, SNode** pNode) { +int32_t nodesStringToNode(const char* pStr, SNode** pNode) { } diff --git a/source/nodes/src/nodesEqual.c b/source/nodes/src/nodesEqualFuncs.c similarity index 95% rename from source/nodes/src/nodesEqual.c rename to source/nodes/src/nodesEqualFuncs.c index bef025fbea0ea4d8d43d444e461b2493f3fa64b2..236326524eaa6d33295cd326cae064854be5a0f0 100644 --- a/source/nodes/src/nodesEqual.c +++ b/source/nodes/src/nodesEqualFuncs.c @@ -32,7 +32,7 @@ #define COMPARE_NODE_FIELD(fldname) \ do { \ - if (!nodeEqual(a->fldname, b->fldname)) \ + if (!nodesEqualNode(a->fldname, b->fldname)) \ return false; \ } while (0) @@ -57,7 +57,7 @@ static bool nodeArrayEqual(const SArray* a, const SArray* b) { size_t size = taosArrayGetSize(a); for (size_t i = 0; i < size; ++i) { - if (!nodeEqual((SNode*)taosArrayGetP(a, i), (SNode*)taosArrayGetP(b, i))) { + if (!nodesEqualNode((SNode*)taosArrayGetP(a, i), (SNode*)taosArrayGetP(b, i))) { return false; } } @@ -101,7 +101,7 @@ static bool functionNodeEqual(const SFunctionNode* a, const SFunctionNode* b) { return true; } -bool nodeEqual(const SNode* a, const SNode* b) { +bool nodesEqualNode(const SNode* a, const SNode* b) { if (a == b) { return true; } diff --git a/source/nodes/src/nodesTraverse.c b/source/nodes/src/nodesTraverseFuncs.c similarity index 61% rename from source/nodes/src/nodesTraverse.c rename to source/nodes/src/nodesTraverseFuncs.c index eac82880991234c0c22ad06eb4eb7bf24acae6cc..d096bbcc0d5a40294c6979e2f3a0f621b92a3676 100644 --- a/source/nodes/src/nodesTraverse.c +++ b/source/nodes/src/nodesTraverseFuncs.c @@ -17,17 +17,17 @@ typedef bool (*FQueryNodeWalker)(SNode* pNode, void* pContext); -bool nodeArrayWalker(SArray* pArray, FQueryNodeWalker walker, void* pContext) { +bool nodesWalkArray(SArray* pArray, FQueryNodeWalker walker, void* pContext) { size_t size = taosArrayGetSize(pArray); for (size_t i = 0; i < size; ++i) { - if (!nodeTreeWalker((SNode*)taosArrayGetP(pArray, i), walker, pContext)) { + if (!nodesWalkNode((SNode*)taosArrayGetP(pArray, i), walker, pContext)) { return false; } } return true; } -bool nodeTreeWalker(SNode* pNode, FQueryNodeWalker walker, void* pContext) { +bool nodesWalkNode(SNode* pNode, FQueryNodeWalker walker, void* pContext) { if (NULL == pNode) { return true; } @@ -43,34 +43,34 @@ bool nodeTreeWalker(SNode* pNode, FQueryNodeWalker walker, void* pContext) { return true; case QUERY_NODE_OPERATOR: { SOperatorNode* pOpNode = (SOperatorNode*)pNode; - if (!nodeTreeWalker(pOpNode->pLeft, walker, pContext)) { + if (!nodesWalkNode(pOpNode->pLeft, walker, pContext)) { return false; } - return nodeTreeWalker(pOpNode->pRight, walker, pContext); + return nodesWalkNode(pOpNode->pRight, walker, pContext); } case QUERY_NODE_LOGIC_CONDITION: - return nodeArrayWalker(((SLogicConditionNode*)pNode)->pParameterList, walker, pContext); + return nodesWalkArray(((SLogicConditionNode*)pNode)->pParameterList, walker, pContext); case QUERY_NODE_IS_NULL_CONDITION: - return nodeTreeWalker(((SIsNullCondNode*)pNode)->pExpr, walker, pContext); + return nodesWalkNode(((SIsNullCondNode*)pNode)->pExpr, walker, pContext); case QUERY_NODE_FUNCTION: - return nodeArrayWalker(((SFunctionNode*)pNode)->pParameterList, walker, pContext); + return nodesWalkArray(((SFunctionNode*)pNode)->pParameterList, walker, pContext); case QUERY_NODE_REAL_TABLE: case QUERY_NODE_TEMP_TABLE: return true; // todo case QUERY_NODE_JOIN_TABLE: { SJoinTableNode* pJoinTableNode = (SJoinTableNode*)pNode; - if (!nodeTreeWalker(pJoinTableNode->pLeft, walker, pContext)) { + if (!nodesWalkNode(pJoinTableNode->pLeft, walker, pContext)) { return false; } - if (!nodeTreeWalker(pJoinTableNode->pRight, walker, pContext)) { + if (!nodesWalkNode(pJoinTableNode->pRight, walker, pContext)) { return false; } - return nodeTreeWalker(pJoinTableNode->pOnCond, walker, pContext); + return nodesWalkNode(pJoinTableNode->pOnCond, walker, pContext); } case QUERY_NODE_GROUPING_SET: - return nodeArrayWalker(((SGroupingSetNode*)pNode)->pParameterList, walker, pContext); + return nodesWalkArray(((SGroupingSetNode*)pNode)->pParameterList, walker, pContext); case QUERY_NODE_ORDER_BY_EXPR: - return nodeTreeWalker(((SOrderByExprNode*)pNode)->pExpr, walker, pContext); + return nodesWalkNode(((SOrderByExprNode*)pNode)->pExpr, walker, pContext); default: break; } @@ -78,6 +78,6 @@ bool nodeTreeWalker(SNode* pNode, FQueryNodeWalker walker, void* pContext) { return false; } -bool stmtWalker(SNode* pNode, FQueryNodeWalker walker, void* pContext) { +bool nodesWalkStmt(SNode* pNode, FQueryNodeWalker walker, void* pContext) { } diff --git a/source/nodes/src/nodesUtil.c b/source/nodes/src/nodesUtilFuncs.c similarity index 86% rename from source/nodes/src/nodesUtil.c rename to source/nodes/src/nodesUtilFuncs.c index fe5883d809bd9a29e1381295d363c52a2067aed0..5c524d2749c3640620840c274f060ec67e0c1b2f 100644 --- a/source/nodes/src/nodesUtil.c +++ b/source/nodes/src/nodesUtilFuncs.c @@ -15,10 +15,10 @@ #include "nodes.h" -bool isTimeorderQuery(const SNode* pQuery) { +bool nodesIsTimeorderQuery(const SNode* pQuery) { } -bool isTimelineQuery(const SNode* pQuery) { +bool nodesIsTimelineQuery(const SNode* pQuery) { } diff --git a/src/connector/go b/src/connector/go new file mode 160000 index 0000000000000000000000000000000000000000..b8f76da4a708d158ec3cc4b844571dc4414e36b4 --- /dev/null +++ b/src/connector/go @@ -0,0 +1 @@ +Subproject commit b8f76da4a708d158ec3cc4b844571dc4414e36b4 diff --git a/src/connector/grafanaplugin b/src/connector/grafanaplugin new file mode 160000 index 0000000000000000000000000000000000000000..4a4d79099b076b8ff12d5b4fdbcba54049a6866d --- /dev/null +++ b/src/connector/grafanaplugin @@ -0,0 +1 @@ +Subproject commit 4a4d79099b076b8ff12d5b4fdbcba54049a6866d diff --git a/src/connector/hivemq-tdengine-extension b/src/connector/hivemq-tdengine-extension new file mode 160000 index 0000000000000000000000000000000000000000..ce5201014136503d34fecbd56494b67b4961056c --- /dev/null +++ b/src/connector/hivemq-tdengine-extension @@ -0,0 +1 @@ +Subproject commit ce5201014136503d34fecbd56494b67b4961056c