Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[branch-2.1](DDL) check illegal partition exprs (#40158) #40651

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

zclllyybb
Copy link
Contributor

pick #40158

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@zclllyybb
Copy link
Contributor Author

run buildall

before:
```sql
mysql> CREATE TABLE not_auto_expr (
    ->     `TIME_STAMP` date NOT NULL
    -> )
    -> partition by range (date_trunc(`TIME_STAMP`, 'day'))()
    -> DISTRIBUTED BY HASH(`TIME_STAMP`) BUCKETS 10
    -> PROPERTIES (
    ->     "replication_allocation" = "tag.location.default: 1"
    -> );
Query OK, 0 rows affected (0.14 sec)
```
now:
```sql
mysql> CREATE TABLE not_auto_expr (
    ->     `TIME_STAMP` date NOT NULL
    -> )
    -> partition by range (date_trunc(`TIME_STAMP`, 'day'))()
    -> DISTRIBUTED BY HASH(`TIME_STAMP`) BUCKETS 10
    -> PROPERTIES (
    ->     "replication_allocation" = "tag.location.default: 1"
    -> );
ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = Non-auto partition table not support partition expr!
```
@zclllyybb
Copy link
Contributor Author

run buildall

@yiguolei yiguolei merged commit bf156d1 into apache:branch-2.1 Sep 11, 2024
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants