You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2020/02/07 10:08:00 UTC

[jira] [Commented] (CALCITE-3777) org.apache.calcite.rel.InvalidRelException: aggregation AVG not supported

    [ https://issues.apache.org/jira/browse/CALCITE-3777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17032270#comment-17032270 ] 

Stamatis Zampetakis commented on CALCITE-3777:
----------------------------------------------

Hi [~jamie12221] , for questions it is better to use the [dev|https://calcite.apache.org/community/#mailing-lists] list instead of creating Jira cases. 

The question is rather broad since there are various ways to optimize and run a logical plan. You can find an end to end example which illustrates the core APIs of Calcite [here|https://github.com/zabetak/calcite/blob/c7646fa6d3054b9e6b9a800e08d18f3cc89922e4/core/src/test/java/org/apache/calcite/examples/foodmart/java/EndToEndExampleEnumerable.java]; essentially it includes also execution. 

> org.apache.calcite.rel.InvalidRelException: aggregation AVG not supported
> -------------------------------------------------------------------------
>
>                 Key: CALCITE-3777
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3777
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.21.0
>            Reporter: jamie12221
>            Priority: Trivial
>
> for RelNode:
>  
> {code:java}
> LogicalAggregate(group=[{}], sm=[COUNT()], EXPR$1=[SUM($0)], EXPR$2=[AVG($0)])
>   LogicalProject(id=[$0])
>     LogicalFilter(condition=[>=($0, 0)])
>       LogicalTableScan(table=[[db1, travelrecord]])
> {code}
> 1.org.apache.calcite.interpreter.Interpreter can not run it.
> 2. LogicalAggregate(group=[{}], sm=[COUNT()], EXPR$1=[SUM($0)], EXPR$2=[AVG($0)]) cannot be applied EnumerableAggregateRule 
> 3. RelRunners.run is ok
> 4.How can I run RelNode without using the calculteconnectionimpl?
>  



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