matrixorigin / matrixorigin/matrixone

[Bug]: ERROR 20101 (HY000): internal error: panic unimplement Subquery Accept: when using sub query in partition key

Open
#18,875 0 comments 0 reactions 1 assignee Claimed by @ck89119 View on GitHub
area/partition deferred kind/bug
Dominant language
Go
Stars
1.9k
Forks
311
Avg merge
1d 3h
Merged PRs (30d)
768

Description

### Is there an existing issue for the same bug?

- [X] I have checked the existing issues.

### Branch Name

main

### Commit ID

afd7c53370cd67a1b21b84e2463ce60702493d06

### Other Environment Information

```Markdown
- Hardware parameters:
- OS type:
- Others:
```

### Actual Behavior

mysql> create table t1 (a int)
-> partition by range (a + (select count(*) from t1))
-> (partition p1 values less than (1));
ERROR 20101 (HY000): internal error: panic unimplement Subquery Accept:
github.com/matrixorigin/matrixone/pkg/sql/parsers/tree.(*Subquery).Accept
/Users/sudong/Program/MatrixOrigin/matrixone/pkg/sql/parsers/tree/expr.go:819
github.com/matrixorigin/matrixone/pkg/sql/parsers/tree.(*BinaryExpr).Accept
/Users/sudong/Program/MatrixOrigin/matrixone/pkg/sql/parsers/tree/expr.go:123
github.com/matrixorigin/matrixone/pkg/sql/plan.checkPartitionExprValid
/Users/sudong/Program/MatrixOrigin/matrixone/pkg/sql/plan/partition.go:127

### Expected Behavior

_No response_

### Steps to Reproduce

```Markdown
create table t1 (a int)
partition by range (a + (select count(*) from t1))
(partition p1 values less than (1));
```

### Additional information

_No response_

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.