Github user hyunsik commented on a diff in the pull request:
https://github.com/apache/tajo/pull/231#discussion_r20976038
--- Diff:
tajo-core/src/main/java/org/apache/tajo/master/querymaster/QueryMasterTask.java
---
@@ -350,9 +351,12 @@ public synchronized void startQuery() {
LOG.warn("Query already started");
return;
}
+ LOG.info(SessionVars.INDEX_ENABLED.keyname() + " : " +
queryContext.getBool(SessionVars.INDEX_ENABLED));
CatalogService catalog =
getQueryTaskContext().getQueryMasterContext().getWorkerContext().getCatalog();
LogicalPlanner planner = new LogicalPlanner(catalog);
- LogicalOptimizer optimizer = new LogicalOptimizer(systemConf);
+ LogicalOptimizer optimizer = new LogicalOptimizer(systemConf,
catalog,
--- End diff --
I think that the role of ```AccessPathRewriterContext``` moved into
SessionVars. AccessPathRewriterContext includes a flag ```enableIndex``` and a
float variable ```selectivityThreshold```. SessionVars can cover its role.
Also, AccessPathRewriterContext includes one rewrite rule which is
performed according to two variables of AccessPathRewriterContext. For that, it
would be better if you change two methods ```isEligible``` and ```rewrite```
```isEligible(OverridenConf, LogicalPlan)``` and ```rewrite(OverriddenConf,
LogicalPlan)```. Because OverriddenConf which is a super class of
```QueryContext``` which includes all variables in SessionVars, two methods
will work according to ```enableIndex``` and ```selectivityThreshold``` given
by users.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---