rohangarg commented on a change in pull request #11434:
URL: https://github.com/apache/druid/pull/11434#discussion_r669603394
##########
File path:
sql/src/main/java/org/apache/druid/sql/calcite/rule/DruidJoinRule.java
##########
@@ -283,7 +283,8 @@ static boolean canHandleCondition(final RexNode condition,
final RelDataType lef
private static boolean isLeftExpression(final RexNode rexNode, final int
numLeftFields)
{
- return
ImmutableBitSet.range(numLeftFields).contains(RelOptUtil.InputFinder.bits(rexNode));
+ ImmutableBitSet inputBitSet = RelOptUtil.InputFinder.bits(rexNode);
+ return !inputBitSet.isEmpty() &&
ImmutableBitSet.range(numLeftFields).contains(inputBitSet);
Review comment:
Also, this new check passes all the tests but fails to compile the query
`SELECT dim1, l1.k FROM foo INNER JOIN (select k || '' as k from
lookup.lookyloo group by 1) l1 ON foo.dim1 = l1.k and l1.k = 'abc'`
will think more about fixing the original issue without modifying the
condition strictness in equi-conditions.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]