zabetak 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_r386312991
 
 

 ##########
 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:
   Instead of adding this code snippet, wouldn't be sufficient to just remove 
the factor 0.01d from the multiplier in line 253? 

----------------------------------------------------------------
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

Reply via email to