xy2953396112 commented on a change in pull request #1737: URL: https://github.com/apache/calcite/pull/1737#discussion_r419296415
########## File path: core/src/main/java/org/apache/calcite/interpreter/Bindables.java ########## @@ -569,6 +633,56 @@ public Node implement(InterpreterImplementor implementor) { } } + /** Implementation of {@link org.apache.calcite.rel.core.Intersect} in + * bindable calling convention. */ + public static class BindableIntersect extends Intersect implements BindableRel { + public BindableIntersect(RelOptCluster cluster, RelTraitSet traitSet, + List<RelNode> inputs, boolean all) { + super(cluster, traitSet, inputs, all); + } + + public BindableIntersect copy(RelTraitSet traitSet, List<RelNode> inputs, boolean all) { + return new BindableIntersect(getCluster(), traitSet, inputs, all); + } + + public Class<Object[]> getElementType() { + return Object[].class; + } + + public Enumerable<Object[]> bind(DataContext dataContext) { + return help(dataContext, this); + } + + public Node implement(InterpreterImplementor implementor) { + return new SetOpNode(implementor.compiler, this); + } + } + + /** Implementation of {@link org.apache.calcite.rel.core.Minus} in + * bindable calling convention. */ + public static class BindableMinus extends Minus implements BindableRel { + public BindableMinus(RelOptCluster cluster, RelTraitSet traitSet, + List<RelNode> inputs, boolean all) { + super(cluster, traitSet, inputs, all); + } + + public BindableMinus copy(RelTraitSet traitSet, List<RelNode> inputs, boolean all) { + return new BindableMinus(getCluster(), traitSet, inputs, all); Review comment: > These Bindables should have some common abstraction. Thanks for review, should we follow the LogicalUnion、LogicalIntersect、LogicalMinus copy method return itself ? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org