use of org.apache.drill.exec.planner.index.ExprToRex in project drill by apache.
the class PluginProjectRule method createPluginProject.
protected Project createPluginProject(Project project, DrillRelOptUtil.ProjectPushInfo projectPushInfo) {
ExprToRex exprToRex = new ExprToRex(project.getInput(), project.getInput().getRowType(), project.getCluster().getRexBuilder());
List<RexNode> newProjects = projectPushInfo.getFields().stream().map(f -> f.accept(exprToRex, null)).collect(Collectors.toList());
return new PluginProjectRel(getOutConvention(), project.getCluster(), project.getTraitSet().replace(getOutConvention()), convert(project.getInput(), project.getTraitSet().replace(getOutConvention())), newProjects, projectPushInfo.createNewRowType(project.getCluster().getTypeFactory()));
}
Aggregations