danny0405 commented on a change in pull request #1737:
URL: https://github.com/apache/calcite/pull/1737#discussion_r414957850
##########
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.
----------------------------------------------------------------
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:
[email protected]