Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support variable when seeking by property index in match clause #5553

Merged
merged 10 commits into from
May 18, 2023
Prev Previous commit
Next Next commit
Move the optimizer utils to common graph util folder
  • Loading branch information
yixinglu committed May 16, 2023
commit 66beca1f96dc7210f354596ab5639980444d40eb
1 change: 0 additions & 1 deletion src/graph/optimizer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
nebula_add_library(
optimizer_obj
OBJECT
OptimizerUtils.cpp
Optimizer.cpp
OptGroup.cpp
OptRule.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/GeoPredicateIndexScanBaseRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
#include "graph/optimizer/OptContext.h"
#include "graph/optimizer/OptGroup.h"
#include "graph/optimizer/OptRule.h"
#include "graph/optimizer/OptimizerUtils.h"
#include "graph/planner/plan/PlanNode.h"
#include "graph/planner/plan/Query.h"
#include "graph/planner/plan/Scan.h"
#include "graph/util/ExpressionUtils.h"
#include "graph/util/OptimizerUtils.h"

using nebula::graph::Filter;
using nebula::graph::IndexScan;
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/IndexFullScanBaseRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#include "graph/optimizer/OptContext.h"
#include "graph/optimizer/OptGroup.h"
#include "graph/optimizer/OptRule.h"
#include "graph/optimizer/OptimizerUtils.h"
#include "graph/planner/plan/Query.h"
#include "graph/planner/plan/Scan.h"
#include "graph/util/OptimizerUtils.h"
#include "interface/gen-cpp2/storage_types.h"

using nebula::graph::IndexScan;
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/IndexScanRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include "graph/optimizer/OptContext.h"
#include "graph/optimizer/OptGroup.h"
#include "graph/optimizer/OptRule.h"
#include "graph/optimizer/OptimizerUtils.h"
#include "graph/planner/plan/PlanNode.h"
#include "graph/planner/plan/Query.h"
#include "graph/util/OptimizerUtils.h"
#include "graph/visitor/RewriteVisitor.h"

using nebula::graph::IndexScan;
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/IndexScanRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#define GRAPH_OPTIMIZER_INDEXSCANRULE_H_

#include "graph/optimizer/OptRule.h"
#include "graph/optimizer/OptimizerUtils.h"
#include "graph/planner/plan/Query.h"
#include "graph/util/OptimizerUtils.h"

namespace nebula {
namespace opt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#include "graph/context/QueryContext.h"
#include "graph/optimizer/OptContext.h"
#include "graph/optimizer/OptGroup.h"
#include "graph/optimizer/OptimizerUtils.h"
#include "graph/planner/plan/PlanNode.h"
#include "graph/planner/plan/Scan.h"
#include "graph/util/ExpressionUtils.h"
#include "graph/util/OptimizerUtils.h"

using nebula::Expression;
using nebula::graph::EdgeIndexFullScan;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
#include "graph/context/QueryContext.h"
#include "graph/optimizer/OptContext.h"
#include "graph/optimizer/OptGroup.h"
#include "graph/optimizer/OptimizerUtils.h"
#include "graph/optimizer/rule/IndexScanRule.h"
#include "graph/planner/plan/PlanNode.h"
#include "graph/planner/plan/Scan.h"
#include "graph/util/ExpressionUtils.h"
#include "graph/util/OptimizerUtils.h"

using nebula::graph::Filter;
using nebula::graph::OptimizerUtils;
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/UnionAllIndexScanBaseRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
#include "graph/optimizer/OptContext.h"
#include "graph/optimizer/OptGroup.h"
#include "graph/optimizer/OptRule.h"
#include "graph/optimizer/OptimizerUtils.h"
#include "graph/planner/plan/PlanNode.h"
#include "graph/planner/plan/Query.h"
#include "graph/planner/plan/Scan.h"
#include "graph/util/ExpressionUtils.h"
#include "graph/util/OptimizerUtils.h"

using nebula::graph::Filter;
using nebula::graph::IndexScan;
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/test/IndexScanRuleTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include <gtest/gtest.h>

#include "graph/optimizer/OptimizerUtils.h"
#include "graph/optimizer/rule/IndexScanRule.h"
#include "graph/util/OptimizerUtils.h"

using nebula::cpp2::PropertyType;
using nebula::graph::OptimizerUtils;
Expand Down
1 change: 1 addition & 0 deletions src/graph/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ nebula_add_library(
PlannerUtil.cpp
ValidateUtil.cpp
Utils.cpp
OptimizerUtils.cpp
)

nebula_add_library(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This source code is licensed under Apache 2.0 License.
*/

#include "graph/optimizer/OptimizerUtils.h"
#include "graph/util/OptimizerUtils.h"

#include "common/base/Status.h"
#include "common/datatypes/Value.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
*
* This source code is licensed under Apache 2.0 License.
*/
#ifndef NEBULA_GRAPH_OPTIMIZER_OPTIMIZERUTILS_H_
#define NEBULA_GRAPH_OPTIMIZER_OPTIMIZERUTILS_H_
#ifndef NEBULA_GRAPH_UTIL_OPTIMIZERUTILS_H_
#define NEBULA_GRAPH_UTIL_OPTIMIZERUTILS_H_

#include "graph/util/SchemaUtil.h"

Expand Down Expand Up @@ -183,4 +183,4 @@ class OptimizerUtils {

} // namespace graph
} // namespace nebula
#endif // NEBULA_GRAPH_OPTIMIZER_OPTIMIZERUTILS_H_
#endif // NEBULA_GRAPH_UTIL_OPTIMIZERUTILS_H_