xzj7019 commented on code in PR #27378:
URL: https://github.com/apache/doris/pull/27378#discussion_r1408678982
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/hint/LeadingHint.java:
##########
@@ -191,6 +196,29 @@ public List<Pair<Long, Expression>> getFilters() {
return filters;
}
+ public void putFilterJoinType(Expression filter, JoinType joinType) {
+ filterJoinType.put(filter, joinType);
+ }
+
+ /**
+ * find out whether filters can match original joinType
+ * @param filters filters needs to put on this join
+ * @param joinType join type computed by join constraint
+ * @return can filters matched
+ */
+ public boolean isFilterJoinTypeMatched(List<Expression> filters, JoinType
joinType) {
+ for (Expression filter : filters) {
+ JoinType originalJoinType = filterJoinType.get(filter);
+ if (originalJoinType.equals(joinType)
+ || originalJoinType.isOuterJoin() && joinType.isOuterJoin()
Review Comment:
Pls also check if it is covered by random test and current ut.
--
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]