rohangarg commented on code in PR #12894:
URL: https://github.com/apache/druid/pull/12894#discussion_r944289931
##########
processing/src/main/java/org/apache/druid/segment/join/HashJoinSegmentStorageAdapter.java:
##########
@@ -212,8 +212,11 @@ public Metadata getMetadata()
@Override
public boolean hasBuiltInFilters()
{
- return clauses.stream()
- .anyMatch(clause -> clause.getJoinType() == JoinType.INNER
&& !clause.getCondition().isAlwaysTrue());
+ // empty clause means that the join has been converted to a filter
(captured in baseFilter). So, if the baseFilter
+ // non-null, then the adapter can potentially filter rows.
+ return (clauses.isEmpty() && baseFilter != null) ||
clauses.stream().anyMatch(
+ clause -> clause.getJoinType() == JoinType.INNER &&
!clause.getCondition().isAlwaysTrue()
Review Comment:
good catch! your suggestion will also accomodate cases where the baseFilter
is originating from other places too apart from join to filter conversion.
--
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]