matrixorigin / matrixorigin/matrixone

Feature Not Supported: ALTER TABLE REORGANIZE PARTITION Not Supported

Open
#23,092 0 comments 0 reactions 1 assignee Assigned to @XuPeng-SH View on GitHub
Dominant language
Go
Stars
1.9k
Forks
311
Avg merge
1d 3h
Merged PRs (30d)
768

Description

# Issue: ALTER TABLE REORGANIZE PARTITION Not Supported

## Description

MatrixOne does not support reorganizing partitions using `ALTER TABLE REORGANIZE PARTITION`. This is a standard MySQL feature for splitting, merging, or redistributing partitions.

## Error Statement

```sql
ALTER TABLE test_partition_list REORGANIZE PARTITION p_beijing, p_guangdong INTO (
PARTITION p_north VALUES IN ('北京', '北京市'),
PARTITION p_south VALUES IN ('广东', '广东省')
);
```

## Error Message

```
ERROR 1064 (HY000) at line 1: SQL parser error: You have an error in your SQL syntax; check the manual that corresponds to your MatrixOne server version for the right syntax to use. syntax error at line 1 column 42 near " REORGANIZE PARTITION p_beijing, p_guangdong INTO (
PARTITION p_north VALUES IN ('北京', '北京市'),
PARTITION p_south VALUES IN ('广东', '广东省')
)"
```

## Expected Behavior

The statement should reorganize the specified partitions, merging `p_beijing` and `p_guangdong` into new partitions `p_north` and `p_south` with redistributed values.

## Actual Behavior

MatrixOne reports a syntax error, indicating that the `REORGANIZE PARTITION` syntax is not recognized by the parser.

## Impact

- Users cannot reorganize partitions (split, merge, redistribute)
- Tables must be recreated to change partition structure
- This significantly limits partition management flexibility
- Migration from MySQL may require schema redesign

## Test Case

**Case ID**: 613
**Test File**: `test_batch_62_partition.sql`
**Test Type**: Partition - REORGANIZE PARTITION operation

## Related Information

- MatrixOne supports creating partitioned tables (RANGE, HASH, KEY)
- Other partition management operations (ADD, TRUNCATE) are also not supported
- This is part of comprehensive partition functionality testing

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.