planner.c 1.5 KB
Newer Older
H
Hongze Cheng 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
/*
 * Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
 *
 * 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 <http://www.gnu.org/licenses/>.
14 15
 */

X
Xiaoyu Wang 已提交
16
#include "planner.h"
17

X
Xiaoyu Wang 已提交
18 19 20 21 22
#include "plannerInt.h"

int32_t optimize(SPlanContext* pCxt, SLogicNode* pLogicNode) {
  return TSDB_CODE_SUCCESS;
}
23

X
Xiaoyu Wang 已提交
24 25 26 27 28 29 30 31 32 33
int32_t qCreateQueryPlan(SPlanContext* pCxt, SQueryPlan** pPlan) {
  SLogicNode* pLogicNode = NULL;
  int32_t code = createLogicPlan(pCxt, &pLogicNode);
  if (TSDB_CODE_SUCCESS == code) {
    code = optimize(pCxt, pLogicNode);
  }
  if (TSDB_CODE_SUCCESS == code) {
    code = buildPhysiPlan(pCxt, pLogicNode, pPlan);
  }
  return code;
34 35
}

X
Xiaoyu Wang 已提交
36
void qSetSubplanExecutionNode(SSubplan* subplan, uint64_t templateId, SDownstreamSource* pSource) {
H
Haojun Liao 已提交
37

X
Xiaoyu Wang 已提交
38
}
H
Haojun Liao 已提交
39

X
Xiaoyu Wang 已提交
40
int32_t qSubPlanToString(const SSubplan* subplan, char** str, int32_t* len) {
H
Haojun Liao 已提交
41

X
Xiaoyu Wang 已提交
42
}
H
Haojun Liao 已提交
43

X
Xiaoyu Wang 已提交
44
int32_t qStringToSubplan(const char* str, SSubplan** subplan) {
45

46
}
X
Xiaoyu Wang 已提交
47

X
Xiaoyu Wang 已提交
48
char* qQueryPlanToString(const SQueryPlan* pPlan) {
49 50 51

}

X
Xiaoyu Wang 已提交
52
SQueryPlan* qStringToQueryPlan(const char* pStr) {
53

X
Xiaoyu Wang 已提交
54 55
}

X
Xiaoyu Wang 已提交
56 57
void qDestroyQueryPlan(SQueryPlan* pPlan) {

X
Xiaoyu Wang 已提交
58
}