Skip to content

Commit

Permalink
[opt](nereids) use rowcount to compute runtime filter size if ndv is …
Browse files Browse the repository at this point in the history
…not available (apache#26022)
  • Loading branch information
englefly authored and wangxiangyu committed Nov 4, 2023
1 parent 81b9f22 commit 7c17586
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@ private long getBuildSideNdv(AbstractPhysicalJoin<? extends Plan, ? extends Plan
}
ExpressionEstimation estimator = new ExpressionEstimation();
ColumnStatistic buildColStats = compare.right().accept(estimator, right.getStats());
return buildColStats.isUnKnown ? -1 : Math.max(1, (long) buildColStats.ndv);
return buildColStats.isUnKnown
? Math.max(1, (long) right.getStats().getRowCount()) : Math.max(1, (long) buildColStats.ndv);
}

public static Slot checkTargetChild(Expression leftChild) {
Expand Down

0 comments on commit 7c17586

Please sign in to comment.