diff --git a/src/query/interpreter.cpp b/src/query/interpreter.cpp index 15065f3c3..5be604d14 100644 --- a/src/query/interpreter.cpp +++ b/src/query/interpreter.cpp @@ -4,3 +4,6 @@ // false, this is useful for recerating antlr crashes in highly concurrent test. // Once antlr bugs are fixed, or real test is written this flag can be removed. DEFINE_bool(ast_cache, true, "Use ast caching."); + +DEFINE_bool(query_cost_planner, true, + "Use the cost estimator to generate plans for queries."); diff --git a/src/query/interpreter.hpp b/src/query/interpreter.hpp index 98f19f956..0d4cbdb80 100644 --- a/src/query/interpreter.hpp +++ b/src/query/interpreter.hpp @@ -14,8 +14,9 @@ #include "query/plan/cost_estimator.hpp" #include "query/plan/planner.hpp" -// TODO: Remove this flag and add flag that limits cache size. +// TODO: Remove ast_cache flag and add flag that limits cache size. DECLARE_bool(ast_cache); +DECLARE_bool(query_cost_planner); namespace query { @@ -77,8 +78,6 @@ class Interpreter : public Loggable { // high level tree -> logical plan std::unique_ptr logical_plan; double query_plan_cost_estimation = 0.0; - // TODO: Use gflags - bool FLAGS_query_cost_planner = true; if (FLAGS_query_cost_planner) { auto plans = plan::MakeLogicalPlan( ast_storage, symbol_table, &db_accessor);