[
https://issues.apache.org/jira/browse/CALCITE-6894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17937438#comment-17937438
]
Zhen Chen commented on CALCITE-6894:
------------------------------------
[~nobigo] Clickhouse can support aggFilterWhere in the form of `sumIf`. No need
to convert to complex `case when`.
> ClickHouse dialect can support another form of writing aggFilterWhere
> ---------------------------------------------------------------------
>
> Key: CALCITE-6894
> URL: https://issues.apache.org/jira/browse/CALCITE-6894
> Project: Calcite
> Issue Type: Improvement
> Reporter: Zhen Chen
> Assignee: Zhen Chen
> Priority: Major
> Labels: pull-request-available
>
> Like this:
> Calcite:
> {code:java}
> sum("shelf_width") filter (where "net_weight" > 0) {code}
> ClickHouse:
> {code:java}
> sumIf(`shelf_width` , `net_weight` > 0E0) {code}
> ref:
> [https://clickhouse.com/docs/sql-reference/aggregate-functions/combinators#-if]
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)