yangzhg opened a new issue, #11881:
URL: https://github.com/apache/doris/issues/11881

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Version
   
   1.0, 1.1.1 1.1.2
   
   ### What's Wrong?
   
   NPE when inpredicate in group by clause
   ```
   ERROR 1105 (HY000): errCode = 2, detailMessage = Unexpected exception: null
   ```
   
   ### What You Expected?
   
   query finished normally
   
   ### How to Reproduce?
   
   ```
   CREATE TABLE `table1` (
     `event_day` date NULL,
     `siteid` int(11) NULL DEFAULT "10",
     `citycode` smallint(6) NULL,
     `username` varchar(32) NULL DEFAULT "",
     `pv` bigint(20) SUM NULL DEFAULT "0"
   ) ENGINE=OLAP
   AGGREGATE KEY(`event_day`, `siteid`, `citycode`, `username`)
   COMMENT 'OLAP'
   DISTRIBUTED BY HASH(`siteid`) BUCKETS 1
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1",
   "in_memory" = "false",
   "storage_format" = "V2"
   )
   ```
   
   ```
   MySQL [test]> select event_day, case when siteid in (1,2) then 'site1' when 
siteid in (3,4) then 'site2' else 'other' end sitename, sum(pv) from table1 
group by event_day, case when siteid in (1,2) then 'site1' when siteid in (3,4) 
then 'site2' else 'other' end;
   ERROR 1105 (HY000): errCode = 2, detailMessage = Unexpected exception: null
   ```
   
   ### Anything Else?
   
   This bug was introduced by #9739
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscr...@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to