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 2022/04/30 15:01:24 UTC

[GitHub] [incubator-doris] morningman opened a new issue, #9340: [Bug] truncate partition with NPE

morningman opened a new issue, #9340:
URL: https://github.com/apache/incubator-doris/issues/9340

   ### 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.0
   
   ### What's Wrong?
   
   ```
   CREATE TABLE tbl (
     `date_id` date NULL,
     `column2` tinyint(4) NULL
   ) ENGINE=OLAP
   DUPLICATE KEY(`date_id`, `column2`)
   PARTITION BY RANGE(`date_id`)
   (
   PARTITION p20200809 VALUES [('2020-08-09'), ('2020-08-10')),
   PARTITION P20200810 VALUES [('2020-08-10'), ('2020-08-11')),
   PARTITION P20200811 VALUES [('2020-08-11'), ('2020-08-12')),
   PARTITION p20200812 VALUES [('2020-08-12'), ('2020-08-13')),
   )
   DISTRIBUTED BY HASH(`client_id`) BUCKETS 1
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1"
   );
   
   truncate table tbl partition(P20200809);
   ```
   
   Error:
   ```
   java.lang.NullPointerException: null
           at org.apache.doris.catalog.Catalog.truncateTable(Catalog.java:6782) ~[palo-fe.jar:1.0-SNAPSHOT]
           at org.apache.doris.qe.DdlExecutor.execute(DdlExecutor.java:246) ~[palo-fe.jar:1.0-SNAPSHOT]
           at org.apache.doris.qe.StmtExecutor.handleDdlStmt(StmtExecutor.java:1520) ~[palo-fe.jar:1.0-SNAPSHOT]
           at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:432) ~[palo-fe.jar:1.0-SNAPSHOT]
           at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:307) ~[palo-fe.jar:1.0-SNAPSHOT]
           at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:212) ~[palo-fe.jar:1.0-SNAPSHOT]
           at org.apache.doris.qe.ConnectProcessor.dispatch(ConnectProcessor.java:349) ~[palo-fe.jar:1.0-SNAPSHOT]
           at org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:538) ~[palo-fe.jar:1.0-SNAPSHOT]
           at org.apache.doris.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:50) ~[palo-fe.jar:1.0-SNAPSHOT]
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_131]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_131]
           at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_131]
   ```
   
   ### What You Expected?
   
   truncate ok
   
   ### How to Reproduce?
   
   This is because the real partition name is `p20200809`, but in truncate stmt,
   it is `P20200809`.
   The partition name is case insensitive, but we didn't handle it correctly in truncate operation.
   
   ### Anything Else?
   
   _No response_
   
   ### 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-unsubscribe@doris.apache.org.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 #9340: [Bug] truncate partition with NPE

Posted by GitBox <gi...@apache.org>.
morningman closed issue #9340: [Bug] truncate partition with NPE
URL: https://github.com/apache/incubator-doris/issues/9340


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