matrixorigin / matrixorigin/matrixone

Feature Not Supported: LIST Partition with VALUES IN (DEFAULT) Syntax Not Supported

Open
#23,089 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: LIST Partition with VALUES IN (DEFAULT) Syntax Not Supported

## Description

MatrixOne does not support the `VALUES IN (DEFAULT)` syntax when creating LIST partitions. This is a standard MySQL syntax for creating a default partition that accepts all values not explicitly listed in other partitions.

## Error Statement

```sql
CREATE TABLE test_partition_list (
id INT,
province VARCHAR(50),
company_name VARCHAR(200)
) PARTITION BY LIST (province) (
PARTITION p_beijing VALUES IN ('北京', '北京市'),
PARTITION p_guangdong VALUES IN ('广东', '广东省'),
PARTITION p_shanghai VALUES IN ('上海', '上海市'),
PARTITION p_other VALUES IN (DEFAULT)
);
```

## 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 9 column 41 near "DEFAULT)"
```

## Expected Behavior

The statement should create a LIST partitioned table with a default partition that accepts all values not matching the explicitly listed partitions.

## Actual Behavior

The parser reports a syntax error at the `DEFAULT)` token, indicating that the `VALUES IN (DEFAULT)` syntax is not recognized.

## Impact

- Users cannot create LIST partitions with default partitions
- Migration from MySQL may fail if the schema uses this syntax
- Workarounds require listing all possible values explicitly

## Test Case

**Case ID**: 602
**Test File**: `test_batch_61_partition.sql`
**Test Type**: Partition - LIST partition creation

## Related Information

- MatrixOne supports RANGE, HASH, and KEY partitions
- LIST partition creation without DEFAULT may work, but needs verification
- 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.