matrixorigin / matrixorigin/matrixone
[Bug]: UNIX_TIMESTAMP func is not allowed for partition function
- 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
MO:
mysql> CREATE TABLE t1 (c TIMESTAMP)
-> PARTITION BY RANGE (UNIX_TIMESTAMP(c))
-> (PARTITION p0 VALUES LESS THAN (UNIX_TIMESTAMP('2000-01-01 00:00:00')),
-> PARTITION p1 VALUES LESS THAN (MAXVALUE));
ERROR 1564 (HY000): This partition function is not allowed
MYSQL:
mysql> CREATE TABLE t1 (c TIMESTAMP)
-> PARTITION BY RANGE (UNIX_TIMESTAMP(c))
-> (PARTITION p0 VALUES LESS THAN (UNIX_TIMESTAMP('2000-01-01 00:00:00')),
-> PARTITION p1 VALUES LESS THAN (MAXVALUE));
Query OK, 0 rows affected (0.04 sec)
### Expected Behavior
_No response_
### Steps to Reproduce
```Markdown
CREATE TABLE t1 (c TIMESTAMP)
PARTITION BY RANGE (UNIX_TIMESTAMP(c))
(PARTITION p0 VALUES LESS THAN (UNIX_TIMESTAMP('2000-01-01 00:00:00')),
PARTITION p1 VALUES LESS THAN (MAXVALUE));
DROP TABLE t1;
```
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.