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

   A partition that does not exist, causing truncate to fail,should require an 
additional check
   1、create table
   CREATE TABLE `range_table_nullable` (
     `k1` int NULL,
     `k2` date NOT NULL,
     `k3` datetime(6) NULL
   ) ENGINE=OLAP
   DUPLICATE KEY(`k1`)
   AUTO PARTITION BY RANGE (date_trunc(`k2`, 'day'))
   (PARTITION p20260402000000 VALUES [('2026-04-02'), ('2026-04-03')),
   PARTITION p20260403000000 VALUES [('2026-04-03'), ('2026-04-04')))
   DISTRIBUTED BY HASH(`k1`) BUCKETS 16
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1",
   "min_load_replica_num" = "-1",
   "is_being_synced" = "false",
   "storage_medium" = "hdd",
   "storage_format" = "V2",
   "inverted_index_storage_format" = "V1",
   "light_schema_change" = "true",
   "disable_auto_compaction" = "false",
   "enable_single_replica_compaction" = "false",
   "group_commit_interval_ms" = "10000",
   "group_commit_data_bytes" = "134217728"
   );
   
   2、insert into range_table_nullable (k1,k2,k3) values 
(2,'2026-04-03','2026-04-03')
   
   3、truncate table range_table_nullable  
PARTITION(p20260406000000,p20260403000000);
   ERROR 1105 (HY000): errCode = 2, detailMessage = Partition p20260406000000 
does not exist


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to