matrixorigin / matrixorigin/matrixone

Feature Not Supported: SELECT FROM table PARTITION (partition_name) Syntax Not Supported

Open
#23,094 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: SELECT FROM table PARTITION (partition_name) Syntax Not Supported

## Description

MatrixOne does not support the `PARTITION (partition_name)` syntax for querying specific partitions directly. This is a standard MySQL feature for accessing individual partitions.

## Error Statement

```sql
SELECT COUNT(*) FROM test_partition_list PARTITION (p_beijing);
```

## 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
```

## Expected Behavior

The statement should query only the `p_beijing` partition of the partitioned table, returning the count of rows in that specific partition.

## Actual Behavior

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

## Impact

- Users cannot directly query specific partitions
- Must use WHERE conditions for partition pruning instead
- Limits fine-grained partition access
- Migration from MySQL may require query rewriting

## Test Case

**Case ID**: 608
**Test File**: `test_batch_61_partition.sql`
**Test Type**: Partition - SELECT from specific partition

## Related Information

- MatrixOne supports partition pruning through WHERE conditions
- Other partition query features (SHOW PARTITIONS, EXPLAIN PARTITIONS) 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.