You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/07/19 06:51:27 UTC

[GitHub] [incubator-doris] xinyiZzz opened a new issue #6265: [BUG] `GROUPING` func and `ORDER BY` are used at the same time to report NullPointerException

xinyiZzz opened a new issue #6265:
URL: https://github.com/apache/incubator-doris/issues/6265


   **Describe the bug**
   Execute the following sql:
   ```
   create table test(col1 int, col2 int) distributed by hash(col1);
   
   insert into test values(1, 2);
   
   SELECT IF(GROUPING(`col1`) = 1, COUNT(col1), 0) AS class_count FROM test GROUP BY GROUPING SETS((col1, col2), (col1)) order by 1;
   ```
   Report an error:
   ```
   ERROR 1064 (HY000): errCode = 2, detailMessage = Unexpected exception: null
   ```
   In fe.log:
   ```
   java.lang.NullPointerException: null
           at org.apache.doris.analysis.GroupingInfo.substituteGroupingFn(GroupingInfo.java:186) ~[palo-fe.jar:3.4.0]
           at org.apache.doris.analysis.GroupingInfo.substituteGroupingFn(GroupingInfo.java:204) ~[palo-fe.jar:3.4.0]
           at org.apache.doris.analysis.GroupingInfo.substituteGroupingFn(GroupingInfo.java:204) ~[palo-fe.jar:3.4.0]
           at org.apache.doris.analysis.GroupingInfo.substituteGroupingFn(GroupingInfo.java:175) ~[palo-fe.jar:3.4.0]
           at org.apache.doris.analysis.SelectStmt.analyze(SelectStmt.java:511) ~[palo-fe.jar:3.4.0]
           at org.apache.doris.qe.StmtExecutor.analyzeAndGenerateQueryPlan(StmtExecutor.java:545) ~[palo-fe.jar:3.4.0]
           at org.apache.doris.qe.StmtExecutor.analyze(StmtExecutor.java:480) ~[palo-fe.jar:3.4.0]
           at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:271) ~[palo-fe.jar:3.4.0]
           at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:249) ~[palo-fe.jar:3.4.0]
           at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:206) ~[palo-fe.jar:3.4.0]
   ```
   
   **Additional context**
   Add any other context about the problem here.
   


-- 
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-unsubscribe@doris.apache.org

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



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


[GitHub] [incubator-doris] morningman closed issue #6265: [BUG] `GROUPING` func and `ORDER BY` are used at the same time to report NullPointerException

Posted by GitBox <gi...@apache.org>.
morningman closed issue #6265:
URL: https://github.com/apache/incubator-doris/issues/6265


   


-- 
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-unsubscribe@doris.apache.org

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



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