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

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

                Author: ASF GitHub Bot
            Created on: 30/Aug/21 21:42
            Start Date: 30/Aug/21 21:42
    Worklog Time Spent: 10m 
      Work Description: apilloud commented on a change in pull request #14729:
URL: https://github.com/apache/beam/pull/14729#discussion_r698828276



##########
File path: 
sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/impl/rule/BeamAggregateProjectMergeRuleTest.java
##########
@@ -59,9 +60,19 @@ public void buildUp() {
     Table projectTable = getTable("TEST_PROJECT", PushDownOptions.PROJECT);
     Table filterTable = getTable("TEST_FILTER", PushDownOptions.FILTER);
     Table noneTable = getTable("TEST_NONE", PushDownOptions.NONE);
+
     tableProvider.createTable(projectTable);
     tableProvider.createTable(filterTable);
     tableProvider.createTable(noneTable);
+
+    // Rules are cost based, need rows to optimize!
+    tableProvider.addRows(
+        "TEST_PROJECT", Row.withSchema(BASIC_SCHEMA).addValues(1, 2, "3", 
4).build());

Review comment:
       No, the row count just needs to be non-zero. Cost based optimization 
uses the row count as the basis for optimization, if the row count is zero then 
project and filter pushdown will never be applied. It is a multiply by zero 
issue.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 643733)
    Time Spent: 29.5h  (was: 29h 20m)

> Upgrade to Calcite 1.26.0
> -------------------------
>
>                 Key: BEAM-9379
>                 URL: https://issues.apache.org/jira/browse/BEAM-9379
>             Project: Beam
>          Issue Type: Task
>          Components: dsl-sql
>            Reporter: Rui Wang
>            Assignee: Andrew Pilloud
>            Priority: P2
>          Time Spent: 29.5h
>  Remaining Estimate: 0h
>
> Upgrade to Calcite 1.22.0 after it gets released (expected by end of Feb 
> 2020).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to