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 2020/06/13 02:58:58 UTC

[GitHub] [incubator-doris] kangkaisen opened a new issue #3854: CaseExpr toThrift NPE

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


   ```
   CREATE TABLE `t1` (
     `a` int(11) NULL COMMENT "",
     `b` int(11) NULL COMMENT "",
     `c` int(11) NULL COMMENT "",
     `d` int(11) NULL COMMENT "",
     `e` int(11) NULL COMMENT ""
   ) ENGINE=OLAP
   DUPLICATE KEY(`a`)
   COMMENT "OLAP"
   DISTRIBUTED BY HASH(`a`) BUCKETS 10
   PROPERTIES (
   "replication_num" = "1",
   "in_memory" = "false",
   "storage_format" = "DEFAULT"
   );
   ```
   
   ```
   INSERT INTO t1(b,e,d,a,c) VALUES(223,221,222,220,224)
   
   INSERT INTO t1(d,e,b,a,c) VALUES(226,227,228,229,225)
   
   INSERT INTO t1(a,c,b,e,d) VALUES(234,231,232,230,233)
   
   INSERT INTO t1(e,b,a,c,d) VALUES(237,236,239,235,238)
   
   INSERT INTO t1(e,c,b,a,d) VALUES(242,244,240,243,241)
   
   INSERT INTO t1(e,d,c,b,a) VALUES(246,248,247,249,245)
   ```
   
   ```
   SELECT CASE WHEN c>(SELECT avg(c) FROM t1) THEN a*2 ELSE b*10 END   FROM t1  ORDER BY 1;
   ```
   
   ```
   2020-06-13 10:58:36,086 WARN 28764 [StmtExecutor.execute():306] execute Exception
   java.lang.NullPointerException: null
           at org.apache.doris.analysis.CaseExpr.toThrift(CaseExpr.java:132) ~[palo-fe.jar:?]
           at org.apache.doris.analysis.Expr.treeToThriftHelper(Expr.java:879) ~[palo-fe.jar:?]
           at org.apache.doris.analysis.Expr.treeToThrift(Expr.java:860) ~[palo-fe.jar:?]
           at org.apache.doris.analysis.Expr.treesToThrift(Expr.java:455) ~[palo-fe.jar:?]
           at org.apache.doris.planner.SortNode.toThrift(SortNode.java:168) ~[palo-fe.jar:?]
           at org.apache.doris.planner.PlanNode.treeToThriftHelper(PlanNode.java:386) ~[palo-fe.jar:?]
           at org.apache.doris.planner.PlanNode.treeToThrift(PlanNode.java:367) ~[palo-fe.jar:?]
           at org.apache.doris.planner.PlanFragment.toThrift(PlanFragment.java:198) ~[palo-fe.jar:?]
           at org.apache.doris.qe.Coordinator$FragmentExecParams.toThrift(Coordinator.java:1485) ~[palo-fe.jar:?]
           at org.apache.doris.qe.Coordinator.exec(Coordinator.java:438) ~[palo-fe.jar:?]
           at org.apache.doris.qe.StmtExecutor.handleQueryStmt(StmtExecutor.java:574) ~[palo-fe.jar:?]
           at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:242) ~[palo-fe.jar:?]
           at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:182) ~[palo-fe.jar:?]
   ```


----------------------------------------------------------------
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.

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] kangkaisen closed issue #3854: CaseExpr toThrift NPE

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


   


----------------------------------------------------------------
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.

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] kangkaisen commented on issue #3854: CaseExpr toThrift NPE

Posted by GitBox <gi...@apache.org>.
kangkaisen commented on issue #3854:
URL: https://github.com/apache/incubator-doris/issues/3854#issuecomment-643560243


   The following query has the same error:
   ```
   SELECT c,
          d-e,
          CASE a+1 WHEN b THEN 111 WHEN c THEN 222
           WHEN d THEN 333  WHEN e THEN 444 ELSE 555 END,
          a+b*2+c*3+d*4,
          e
     FROM t1
    WHERE d NOT BETWEEN 110 AND 150
       OR c BETWEEN b-2 AND d+2
       OR (e>c OR e<d)
    ORDER BY 1,5,3,2,4
   ```


----------------------------------------------------------------
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.

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