use of io.mycat.DrdsSqlCompiler in project Mycat2 by MyCATApache.
the class UnionAllTest method parse.
public static Explain parse(String sql) {
DrdsSqlCompiler drds = getDrds();
DrdsSqlWithParams drdsSqlWithParams = DrdsRunnerHelper.preParse(sql, null);
OptimizationContext optimizationContext = new OptimizationContext();
MycatRel dispatch = drds.dispatch(optimizationContext, drdsSqlWithParams);
Plan plan = new PlanImpl(dispatch, DrdsExecutorCompiler.getCodeExecuterContext(optimizationContext.relNodeContext.getConstantMap(), dispatch, false), drdsSqlWithParams.getAliasList());
return new Explain(plan, drdsSqlWithParams);
}
use of io.mycat.DrdsSqlCompiler in project Mycat2 by MyCATApache.
the class AllShardingJoinTest method parse.
public static Explain parse(String sql) {
DrdsSqlCompiler drds = getDrds();
DrdsSqlWithParams drdsSqlWithParams = DrdsRunnerHelper.preParse(sql, null);
OptimizationContext optimizationContext = new OptimizationContext();
MycatRel dispatch = drds.dispatch(optimizationContext, drdsSqlWithParams);
Plan plan = new PlanImpl(dispatch, DrdsExecutorCompiler.getCodeExecuterContext(optimizationContext.relNodeContext.getConstantMap(), dispatch, false), drdsSqlWithParams.getAliasList());
return new Explain(plan, drdsSqlWithParams);
}
Aggregations