The companion class to DrillSqlWorker is DefaultSqlHandler [1]. Drill actually does five or so phases of planning, moving back and forth between Hep and Volcano.
[1] https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/DefaultSqlHandler.java On Fri, Nov 13, 2015 at 2:13 AM, Amogh Margoor <[email protected]> wrote: > Hi, > We want to use Volcanno planner and get back the optimized Logical RelNode. > Currently, we modified CalcitePrepareImpl.java > < > https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/prepare/CalcitePrepareImpl.java > >, > so that it returns us the optimized RelNode half way through, but it's > Enumberable. We were trying to find cleaner ways to do it through > Frameworks and stumbled upon this piece of code in Apache Drill: > DrillSqlWorker > < > https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlWorker.java > >. > Here Frameworks is used to get RelNode, which they pass to Hep planner. We > tried to do same with Volcanno Planner but it throws up during optimization > saying "Relational expression .. belongs to a different planner than is > currently being used". Any other way we can do it or are we missing > something here ? > > Regards, > Amogh >
