-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
Search before asking
- I had searched in the issues 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?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels