suibianwanwank commented on code in PR #3883:
URL: https://github.com/apache/calcite/pull/3883#discussion_r1712403347
##########
core/src/main/java/org/apache/calcite/rel/metadata/RelMdUtil.java:
##########
@@ -831,6 +831,9 @@ public static double getMinusRowCount(RelMetadataQuery mq,
Minus minus) {
}
double innerRowCount = left * right * selectivity;
switch (join.getJoinType()) {
+ case ASOF:
+ case LEFT_ASOF:
Review Comment:
My understanding is that for a regular inner join, selectivity means the
probability of the condition being true in the result, and 1 - selectivity is
because for an outer join we need to add the unmatched rows on the null side.
For asof join, we should consider how many matches there are against the
left table, and we also could to consider the matchCondition, which is more
complicated. Perhaps this optimization can be discussed in another issue.
--
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]