danny0405 commented on a change in pull request #1841: Following CALCITE-3769:
Add BindableTableScanRule into the default ru…
URL: https://github.com/apache/calcite/pull/1841#discussion_r386352617
##########
File path: core/src/main/java/org/apache/calcite/interpreter/Bindables.java
##########
@@ -234,6 +234,11 @@ public static BindableTableScan create(RelOptCluster
cluster,
@Override public RelOptCost computeSelfCost(RelOptPlanner planner,
RelMetadataQuery mq) {
+ boolean noPushing = filters.isEmpty()
+ && projects.size() == table.getRowType().getFieldCount();
+ if (noPushing) {
+ return super.computeSelfCost(planner, mq);
+ }
Review comment:
Yes, the `0.01d` factor would ensure that we choose the `BindableTableScan`
if we have any pushing projects or filter. The EnumerableInterpreter has
another `0.5` overhead of the input table.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services