You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2020/11/03 00:45:00 UTC

[jira] [Resolved] (CALCITE-4345) SUM CASE WHEN xxx THEN 1 without "ELSE" throws NPE in AggregateCaseToFilterRule

     [ https://issues.apache.org/jira/browse/CALCITE-4345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde resolved CALCITE-4345.
----------------------------------
    Resolution: Fixed

Fixed in [c7084568|https://github.com/apache/calcite/commit/c70845687337ac65d00d3680d551549b9bda2b56]; thanks for the PR, [~Aron.tao]!

> SUM CASE WHEN xxx THEN 1 without "ELSE" throws NPE in AggregateCaseToFilterRule
> -------------------------------------------------------------------------------
>
>                 Key: CALCITE-4345
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4345
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Jiatao Tao
>            Assignee: Julian Hyde
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.27.0
>
>         Attachments: image-2020-10-19-16-59-44-900.png
>
>          Time Spent: 4h
>  Remaining Estimate: 0h
>
> Add a test in CsvTest:
>  
> {code:java}
> @Test void testSumCaseWhenWithoutElse() throws SQLException {
>   sql("model", "select sum( CASE WHEN empno=10 THEN 1 END ) from EMPS").ok();
> }
> {code}
> Will throw NPE
>  



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