korlov42 commented on a change in pull request #9009:
URL: https://github.com/apache/ignite/pull/9009#discussion_r616430744



##########
File path: 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/MinusNode.java
##########
@@ -0,0 +1,341 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.query.calcite.exec.rel;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import org.apache.calcite.rel.type.RelDataType;
+import 
org.apache.ignite.internal.processors.query.calcite.exec.ExecutionContext;
+import org.apache.ignite.internal.processors.query.calcite.exec.RowHandler;
+import 
org.apache.ignite.internal.processors.query.calcite.exec.RowHandler.RowFactory;
+import 
org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.AggregateType;
+import 
org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.GroupKey;
+import org.apache.ignite.internal.util.typedef.F;
+
+/**
+ * Execution node for MINUS (EXCEPT) operator.
+ */
+public class MinusNode<Row> extends AbstractNode<Row> {

Review comment:
       > we still need to process all sources on the MAP phase
   
   `select_1 EXCEPT select_2 EXCEPT select_3 EXCEPT select_n` should be 
evaluated as `((select_1 EXCEPT select_2) EXCEPT select_3) EXCEPT select_n`. 
Could you please explain why we need to process rows from `select_n` on MAP 
phase if results of `(...) EXCEPT select_3` is empty? It's unclear to me right 
now.
   
   
   > I propose to start with the current implementation
   
   works for me. It's better to benchmark both approaches and compare results 
to decide which one is better.




-- 
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]


Reply via email to