[
https://issues.apache.org/jira/browse/DRILL-6833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16684447#comment-16684447
]
ASF GitHub Bot commented on DRILL-6833:
---------------------------------------
gparai commented on a change in pull request #1532: DRILL-6833: Support for
pushdown of rowkey based joins
URL: https://github.com/apache/drill/pull/1532#discussion_r232836231
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillPushRowKeyJoinToScanRule.java
##########
@@ -0,0 +1,520 @@
+/*
+ * 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.logical;
+
+
+import org.apache.calcite.plan.RelOptPlanner;
+import org.apache.calcite.plan.RelOptRule;
+import org.apache.calcite.plan.RelOptRuleCall;
+import org.apache.calcite.plan.RelOptRuleOperand;
+import org.apache.calcite.plan.RelOptUtil;
+import org.apache.calcite.plan.hep.HepRelVertex;
+import org.apache.calcite.plan.volcano.RelSubset;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.core.JoinRelType;
+import org.apache.calcite.rel.metadata.RelMetadataQuery;
+import org.apache.calcite.rex.RexCall;
+import org.apache.calcite.rex.RexInputRef;
+import org.apache.calcite.rex.RexNode;
+import org.apache.calcite.sql.SqlKind;
+import org.apache.calcite.util.Pair;
+import org.apache.drill.exec.planner.logical.RowKeyJoinCallContext.RowKey;
+import org.apache.drill.exec.physical.base.DbGroupScan;
+import org.apache.drill.exec.planner.index.rules.MatchFunction;
+import org.apache.drill.exec.planner.physical.PrelUtil;
+
+import org.apache.drill.shaded.guava.com.google.common.collect.ImmutableList;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DrillPushRowKeyJoinToScanRule extends RelOptRule {
Review comment:
@amansinha100 I have addressed your review comments. Please take a look and
let me know your thoughts.
----------------------------------------------------------------
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]
> MapRDB queries with Run Time Filters with row_key/Secondary Index Should
> Support Pushdown
> -----------------------------------------------------------------------------------------
>
> Key: DRILL-6833
> URL: https://issues.apache.org/jira/browse/DRILL-6833
> Project: Apache Drill
> Issue Type: New Feature
> Affects Versions: 1.15.0
> Reporter: Gautam Parai
> Assignee: Gautam Parai
> Priority: Major
> Fix For: 1.15.0
>
>
> Drill should push down all row key filters to maprDB for queries that only
> have WHERE conditions on row_keys. In the following example, the query only
> has where clause on row_keys:
> select t.mscIdentities from dfs.root.`/user/mapr/MixTable` t where t.row_key=
> (select max(convert_fromutf8(i.KeyA.ENTRY_KEY)) from
> dfs.root.`/user/mapr/TableIMSI` i where i.row_key='460021050005636')
> row_keys can return at most 1 row. So the physical planning must leverage
> MapRDB row_key push down to execute the sub query, with its results execute
> the outer query. Currently only the inner query is pushed down. The outer
> query requires a table scan.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)