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_r386315962
##########
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:
No, we should give a preference though, so that the planner would choose
BindableTableScan instead of EnumerabeTableScan, without this factor(0.01d),
the BindableTableScan would never be choosed if the BindableTableScan has an
expression and also pushings.
----------------------------------------------------------------
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