[
https://issues.apache.org/jira/browse/DRILL-6321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16475235#comment-16475235
]
ASF GitHub Bot commented on DRILL-6321:
---------------------------------------
amansinha100 commented on a change in pull request #1258: DRILL-6321: Lateral
Join and Unnest - initial implementation for parser and planning
URL: https://github.com/apache/drill/pull/1258#discussion_r188150611
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/CorrelatePrule.java
##########
@@ -0,0 +1,56 @@
+/*
+ * 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.drill.exec.planner.physical;
+
+import org.apache.calcite.plan.RelOptRule;
+import org.apache.calcite.plan.RelOptRuleCall;
+import org.apache.calcite.plan.RelOptRuleOperand;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.RelNode;
+import org.apache.drill.exec.planner.logical.DrillCorrelateRel;
+import org.apache.drill.exec.planner.logical.RelOptHelper;
+
+public class CorrelatePrule extends Prule {
+ public static final RelOptRule INSTANCE = new
CorrelatePrule("Prel.CorrelatePrule",
+ RelOptHelper.any(DrillCorrelateRel.class));
+
+ private CorrelatePrule(String name, RelOptRuleOperand operand) {
+ super(operand, name);
+ }
+
+ @Override
+ public void onMatch(RelOptRuleCall call) {
+ final DrillCorrelateRel correlate = call.rel(0);
+ final RelNode left = correlate.getLeft();
+ final RelNode right = correlate.getRight();
+ RelTraitSet traitsLeft = left.getTraitSet().plus(Prel.DRILL_PHYSICAL);
+ RelTraitSet traitsRight = right.getTraitSet().plus(Prel.DRILL_PHYSICAL);
+
+ RelTraitSet corrTraits =
traitsLeft.plus(DrillDistributionTrait.RANDOM_DISTRIBUTED);
Review comment:
Pls add a comment about why RANDOM_DISTRIBUTED trait is chosen for
correlate/lateral.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Lateral Join: Planning changes - enable submitting physical plan
> ----------------------------------------------------------------
>
> Key: DRILL-6321
> URL: https://issues.apache.org/jira/browse/DRILL-6321
> Project: Apache Drill
> Issue Type: Task
> Reporter: Parth Chandra
> Assignee: Chunhui Shi
> Priority: Major
> Labels: ready-to-commit
> Fix For: 1.14.0
>
>
> Implement changes to enable submitting a physical plan containing lateral and
> unnest.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)