[ 
https://issues.apache.org/jira/browse/BEAM-4663?focusedWorklogId=155058&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-155058
 ]

ASF GitHub Bot logged work on BEAM-4663:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Oct/18 18:54
            Start Date: 16/Oct/18 18:54
    Worklog Time Spent: 10m 
      Work Description: amaliujia commented on a change in pull request #6656: 
[BEAM-4663] [SQL] CBO cost calculation
URL: https://github.com/apache/beam/pull/6656#discussion_r225666699
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamAggregationRel.java
 ##########
 @@ -111,6 +114,15 @@ public RelWriter explainTerms(RelWriter pw) {
     return pw;
   }
 
+  @Override
+  public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery 
metadata) {
+    RelNode child = getInput();
+    Double rowCnt = metadata.getRowCount(child);
 
 Review comment:
   Because there is no support to get the relatively estimate row count yet, I 
suggest we don't work on CBO but focus on something we can control (e.g. 
logical optimization). For example, we can work on figuring out whether rules 
work in  
[BeamRuleSets.java](https://github.com/apache/beam/blob/master/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/planner/BeamRuleSets.java).
 I have seen an issue that we add a rule int the list but that rule triggers a 
bug at a moment. Also some rules definitely are not working because of traits 
setup.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 155058)
    Time Spent: 1h 20m  (was: 1h 10m)

> Implement Cost calculations for Cost-Based Optimization (CBO) 
> --------------------------------------------------------------
>
>                 Key: BEAM-4663
>                 URL: https://issues.apache.org/jira/browse/BEAM-4663
>             Project: Beam
>          Issue Type: Sub-task
>          Components: dsl-sql
>            Reporter: Kai Jiang
>            Priority: Major
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> To support CBO, we should implement methods in each Beam*Rel.java.  
> computeSelfCost(...) as our first step.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to