matrixorigin / matrixorigin/matrixone
Feature Not Supported: ALTER TABLE TRUNCATE PARTITION Not Supported
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 311
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 768
Description
# Issue: ALTER TABLE TRUNCATE PARTITION Not Supported
## Description
MatrixOne does not support truncating individual partitions using `ALTER TABLE TRUNCATE PARTITION`. This is a standard MySQL feature for quickly removing all data from a specific partition without dropping the partition structure.
## Error Statement
```sql
ALTER TABLE test_partition_range TRUNCATE PARTITION p2021;
```
## Error Message
```
ERROR 20105 (HY000) at line 1: not supported: unsupported alter option in inplace mode: truncate partition p2021
```
## Expected Behavior
The statement should remove all data from the `p2021` partition while keeping the partition structure intact.
## Actual Behavior
MatrixOne reports that truncating partitions is not supported in inplace mode, indicating this operation is not implemented.
## Impact
- Users cannot quickly clear data from specific partitions
- Must use DELETE statements which may be slower for large partitions
- Limits partition maintenance capabilities
- Migration from MySQL may require different data management strategies
## Test Case
**Case ID**: 607
**Test File**: `test_batch_61_partition.sql`
**Test Type**: Partition - TRUNCATE PARTITION operation
## Related Information
- MatrixOne supports creating partitioned tables (RANGE, HASH, KEY)
- Other partition management operations (ADD, REORGANIZE) are also not supported
- This is part of comprehensive partition functionality testing
Contributor guide
Assessment
This issue has not been assessed yet.