matrixorigin / matrixorigin/matrixone

[Bug]: error when inserting NULL value to list partition with value NULL

Open
#18,685 20 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

b2d8e4aefb0d7b3b3d7deb19a772c6bbfa973a9f

### Other Environment Information

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

### Actual Behavior

mo:
mysql> create table t1 (a int,b int, c int)
-> partition by list(a)
-> partitions 2
-> (partition x123 values in (11, 12),
-> partition x234 values in (NULL, 1));
Query OK, 0 rows affected (0.04 sec)

mysql>
mysql> insert into t1 values (11,1,6);
Query OK, 1 row affected (0.02 sec)

mysql> insert into t1 values (NULL,1,1);
ERROR 20301 (HY000): invalid input: Table has no partition for value from column_list

mysql:
mysql> create table t1 (a int,b int, c int)
-> partition by list(a)
-> partitions 2
-> (partition x123 values in (11, 12),
-> partition x234 values in (NULL, 1));
Query OK, 0 rows affected (0.04 sec)

mysql>
mysql> insert into t1 values (11,1,6);
Query OK, 1 row affected (0.00 sec)

mysql> insert into t1 values (NULL,1,1);
Query OK, 1 row affected (0.01 sec)

### Expected Behavior

_No response_

### Steps to Reproduce

```Markdown
create table t1 (a int,b int, c int)
partition by list(a)
partitions 2
(partition x123 values in (11, NULL),
partition x234 values in (1 ,NULL));
```

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