Skip to content

Commit

Permalink
[CALCITE-6615] BindableTableScan estimateRowCount does not calculate …
Browse files Browse the repository at this point in the history
…push down filters
  • Loading branch information
suibianwanwank authored and mihaibudiu committed Nov 13, 2024
1 parent af4391d commit f14e944
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@ public static BindableTableScan create(RelOptCluster cluster,
.itemIf("projects", projects, !projects.equals(identity()));
}

@Override public double estimateRowCount(RelMetadataQuery mq) {
double f = filters.isEmpty() ? 1d : 0.5d;
return super.estimateRowCount(mq) * f;
}

@Override public @Nullable RelOptCost computeSelfCost(RelOptPlanner planner,
RelMetadataQuery mq) {
boolean noPushing = filters.isEmpty()
Expand Down

0 comments on commit f14e944

Please sign in to comment.