gianm commented on a change in pull request #10697:
URL: https://github.com/apache/druid/pull/10697#discussion_r587924983



##########
File path: 
sql/src/main/java/org/apache/druid/sql/calcite/rule/DruidJoinRule.java
##########
@@ -97,18 +98,19 @@ public void onMatch(RelOptRuleCall call)
 
     final DruidRel<?> newLeft;
     final DruidRel<?> newRight;
+    final Filter leftFilter;
     final List<RexNode> newProjectExprs = new ArrayList<>();
 
     // Already verified to be present in "matches", so just call "get".
     // Can't be final, because we're going to reassign it up to a couple of 
times.
     ConditionAnalysis conditionAnalysis = 
analyzeCondition(join.getCondition(), join.getLeft().getRowType()).get();
 
-    if (left.getPartialDruidQuery().stage() == 
PartialDruidQuery.Stage.SELECT_PROJECT
-        && left.getPartialDruidQuery().getWhereFilter() == null) {
+    if (left.getPartialDruidQuery().stage() == 
PartialDruidQuery.Stage.SELECT_PROJECT) {

Review comment:
       This may not work right if `left` is a DruidJoinQueryRel or 
DruidOuterQueryRel instead of a DruidQueryRel (since `leftFilter` is only 
supported for regular tables).




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to