[
https://issues.apache.org/jira/browse/DRILL-6878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16716546#comment-16716546
]
ASF GitHub Bot commented on DRILL-6878:
---------------------------------------
amansinha100 commented on a change in pull request #1568: DRILL-6878: Use
DrillPushRowKeyJoinToScan rule on DrillJoin pattern to o account for
DrillSemiJoin
URL: https://github.com/apache/drill/pull/1568#discussion_r240485180
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillJoinRel.java
##########
@@ -55,53 +53,33 @@
private int joinControl = JoinControl.DEFAULT;
public DrillJoinRel(RelOptCluster cluster, RelTraitSet traits, RelNode left,
RelNode right, RexNode condition,
- JoinRelType joinType) {
- this(cluster, traits, left, right, condition, joinType, false);
- }
-
- public DrillJoinRel(RelOptCluster cluster, RelTraitSet traits, RelNode left,
RelNode right, RexNode condition,
- JoinRelType joinType, boolean isSemiJoin) {
+ JoinRelType joinType) {
super(cluster, traits, left, right, condition, joinType);
assert traits.contains(DrillRel.DRILL_LOGICAL);
RelOptUtil.splitJoinCondition(left, right, condition, leftKeys, rightKeys,
filterNulls);
- this.isSemiJoin = isSemiJoin;
}
public DrillJoinRel(RelOptCluster cluster, RelTraitSet traits, RelNode left,
RelNode right, RexNode condition,
JoinRelType joinType, int joinControl) {
- this(cluster, traits, left, right, condition, joinType, joinControl,
false);
- }
-
- public DrillJoinRel(RelOptCluster cluster, RelTraitSet traits, RelNode left,
RelNode right, RexNode condition,
- JoinRelType joinType, int joinControl, boolean
isSemiJoin) {
super(cluster, traits, left, right, condition, joinType);
assert traits.contains(DrillRel.DRILL_LOGICAL);
RelOptUtil.splitJoinCondition(left, right, condition, leftKeys, rightKeys,
filterNulls);
this.joinControl = joinControl;
- this.isSemiJoin = isSemiJoin;
}
public DrillJoinRel(RelOptCluster cluster, RelTraitSet traits, RelNode left,
RelNode right, RexNode condition,
JoinRelType joinType, List<Integer> leftKeys, List<Integer> rightKeys)
throws InvalidRelException {
- this(cluster, traits, left, right, condition, joinType, leftKeys,
rightKeys, false);
- }
-
- public DrillJoinRel(RelOptCluster cluster, RelTraitSet traits, RelNode left,
RelNode right, RexNode condition,
- JoinRelType joinType, List<Integer> leftKeys, List<Integer> rightKeys,
boolean isSemiJoin)
- throws InvalidRelException {
super(cluster, traits, left, right, condition, joinType);
assert traits.contains(DrillRel.DRILL_LOGICAL);
assert (leftKeys != null && rightKeys != null);
this.leftKeys = leftKeys;
this.rightKeys = rightKeys;
- this.isSemiJoin = isSemiJoin;
}
@Override
- public DrillJoinRel copy(RelTraitSet traitSet, RexNode condition, RelNode
left, RelNode right, JoinRelType joinType,
- boolean semiJoinDone) {
- return new DrillJoinRel(getCluster(), traitSet, left, right, condition,
joinType, semiJoinDone);
+ public DrillJoinRel copy(RelTraitSet traitSet, RexNode condition, RelNode
left, RelNode right, JoinRelType joinType, boolean semiJoinDone) {
Review comment:
The copy() method is taking a `semiJoinDone` argument even though it does
not use it.
----------------------------------------------------------------
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]
> Index Plan Test failures after DRILL-6833
> -----------------------------------------
>
> Key: DRILL-6878
> URL: https://issues.apache.org/jira/browse/DRILL-6878
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 1.15.0
> Reporter: Gautam Parai
> Assignee: Gautam Parai
> Priority: Blocker
> Fix For: 1.15.0
>
>
> [ERROR] Failures:
> [ERROR] IndexPlanTest.testCastTimestampPlan:1148 Incorrect number of rows
> returned by query. expected:<1> but was:<0>
> [ERROR] IndexPlanTest.testRowkeyJoinPushdown_1:1702 Did not find expected
> pattern in plan: RowKeyJoin
> 00-00 Screen
> 00-01 Project(ssn=[$0])
> 00-02 Project(ssn=[$1])
> 00-03 HashJoin(condition=[=($0, $2)], joinType=[inner], semi-join: =[true])
> 00-05 Project(_id=[$0], ITEM=[ITEM($1, 'ssn')])
> 00-06 Scan(table=[[hbase, index_test_primary]], groupscan=[JsonTableGroupScan
> [ScanSpec=JsonScanSpec [tableName=maprfs:///tmp/index_test_primary,
> condition=null], columns=[`_id`, `id`.`ssn`], maxwidth=2]])
> 00-04 Scan(table=[[hbase, index_test_primary]], groupscan=[JsonTableGroupScan
> [ScanSpec=JsonScanSpec [tableName=maprfs:///tmp/index_test_primary,
> condition=($0 =
> {"$date":"2013-02-04T22:34:38.000Z"}
> ), indexName=hash_i_cast_timestamp_firstlogin], columns=[`_id`],
> maxwidth=10]])
> [ERROR] IndexPlanTest.testRowkeyJoinPushdown_10:1883 Incorrect number of rows
> returned by query. expected:<1> but was:<0>
> [ERROR] IndexPlanTest.testRowkeyJoinPushdown_12:1918 Did not find expected
> pattern in plan: HashJoin(.*[
> ])+.*Scan.*indexName=i_state_city_dl(.*[
> ])+.*RowKeyJoin(.*[
> ])+.*RestrictedJsonTableGroupScan(.*[
> ])+.*HashAgg(group=[\{0}])(.*[
> ])+.*HashJoin
> 00-00 Screen
> 00-01 Project(ssn=[$0])
> 00-02 Project(ssn=[$1])
> 00-03 HashJoin(condition=[=($0, $5)], joinType=[inner], semi-join: =[true])
> 00-05 HashJoin(condition=[=($2, $3)], joinType=[inner], semi-join: =[false])
> 00-08 Project(_id=[$0], ITEM=[ITEM($1, 'ssn')], ITEM2=[ITEM($2, 'city')])
> 00-11 Scan(table=[[hbase, index_test_primary]], groupscan=[JsonTableGroupScan
> [ScanSpec=JsonScanSpec [tableName=maprfs:///tmp/index_test_primary,
> condition=null], columns=[`_id`, `id`.`ssn`, `address`.`city`], maxwidth=2]])
> 00-07 Project(ITEM0=[$0], ITEM1=[$1])
> 00-10 Project(ITEM=[ITEM($0, 'city')], ITEM1=[ITEM($0, 'state')])
> 00-14 Scan(table=[[hbase, index_test_primary]], groupscan=[JsonTableGroupScan
> [ScanSpec=JsonScanSpec [tableName=maprfs:///tmp/index_test_primary,
> condition=(address.state = "pc"), indexName=i_state_city_dl],
> columns=[`address`.`city`, `address`.`state`], maxwidth=1]])
> 00-04 Project(EXPR$0=[CAST(CAST($0):INTEGER):VARCHAR(10) CHARACTER SET
> "UTF-16LE" COLLATE "UTF-16LE$en_US$primary"])
> 00-06 Project(rowid=[$1], ITEM=[$2], ITEM2=[$3], ITEM0=[$0])
> 00-09 HashJoin(condition=[=($2, $0)], joinType=[inner], semi-join: =[false])
> 00-13 Project(ITEM=[ITEM($0, 'city')])
> 00-16 Scan(table=[[hbase, index_test_primary]], groupscan=[JsonTableGroupScan
> [ScanSpec=JsonScanSpec [tableName=maprfs:///tmp/index_test_primary,
> condition=null], columns=[`address`.`city`], maxwidth=2]])
> 00-12 Project(rowid=[$0], ITEM0=[$1], ITEM2=[$2])
> 00-15 SelectionVectorRemover
> 00-17 Filter(condition=[=(CAST($2):TIMESTAMP(0), 2013-02-04 22:34:38)])
> 00-18 Project(rowid=[$0], ITEM=[ITEM($1, 'city')], ITEM2=[ITEM(ITEM($2,
> 'irs'), 'firstlogin')])
> 00-19 Scan(table=[[hbase, index_test_primary]], groupscan=[JsonTableGroupScan
> [ScanSpec=JsonScanSpec [tableName=maprfs:///tmp/index_test_primary,
> condition=null], columns=[`rowid`, `address`.`city`,
> `activity`.`irs`.`firstlogin`], maxwidth=2]])
> [ERROR] IndexPlanTest.testRowkeyJoinPushdown_6:1799 Did not find expected
> pattern in plan: RowKeyJoin
> 00-00 Screen
> 00-01 Project(ssn=[$0])
> 00-02 Project(ssn=[$1])
> 00-03 HashJoin(condition=[=($0, $2)], joinType=[inner], semi-join: =[true])
> 00-05 Project(_id=[$0], ITEM=[ITEM($1, 'ssn')])
> 00-07 Scan(table=[[hbase, index_test_primary]], groupscan=[JsonTableGroupScan
> [ScanSpec=JsonScanSpec [tableName=maprfs:///tmp/index_test_primary,
> condition=null], columns=[`_id`, `id`.`ssn`], maxwidth=2]])
> 00-04 Project(EXPR$0=[CAST(CAST($0):INTEGER):VARCHAR(10) CHARACTER SET
> "UTF-16LE" COLLATE "UTF-16LE$en_US$primary"])
> 00-06 Project(rowid=[$1], ITEM=[$2], ITEM2=[$3], ITEM0=[$0])
> 00-08 HashJoin(condition=[=($2, $0)], joinType=[inner], semi-join: =[false])
> 00-10 Project(ITEM=[ITEM($0, 'city')])
> 00-12 Scan(table=[[hbase, index_test_primary]], groupscan=[JsonTableGroupScan
> [ScanSpec=JsonScanSpec [tableName=maprfs:///tmp/index_test_primary,
> condition=null], columns=[`address`.`city`], maxwidth=2]])
> 00-09 Project(rowid=[$0], ITEM0=[$1], ITEM2=[$2])
> 00-11 SelectionVectorRemover
> 00-13 Filter(condition=[=(CAST($2):TIMESTAMP(0), 2013-02-04 22:34:38)])
> 00-14 Project(rowid=[$0], ITEM=[ITEM($1, 'city')], ITEM2=[ITEM(ITEM($2,
> 'irs'), 'firstlogin')])
> 00-15 Scan(table=[[hbase, index_test_primary]], groupscan=[JsonTableGroupScan
> [ScanSpec=JsonScanSpec [tableName=maprfs:///tmp/index_test_primary,
> condition=null], columns=[`rowid`, `address`.`city`,
> `activity`.`irs`.`firstlogin`], maxwidth=2]])
> [ERROR] IndexPlanTest.testRowkeyJoinPushdown_7:1825 Incorrect number of rows
> returned by query. expected:<1> but was:<0>
> [ERROR] IndexPlanTest.testRowkeyJoinPushdown_9:1864 Incorrect number of rows
> returned by query. expected:<1> but was:<0>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)