You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "apatrida (via GitHub)" <gi...@apache.org> on 2026/04/22 19:29:58 UTC
[I] [Bug] REGRESSION in 4.1 for CLUSTER BY on UNIQUE KEY tables [doris]
apatrida opened a new issue, #62727:
URL: https://github.com/apache/doris/issues/62727
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
### Version
4.1
### What's Wrong?
You can no longer use `CLUSTER BY` in a unique key table create statement.
```
CREATE TABLE foo
( ... )
UNIQUE KEY (myKey)
CLUSTER BY (something)
...
[HY000][1105] errCode = 2, detailMessage =
mismatched input 'CLUSTER' expecting {<EOF>, ';'}(line 10, pos 0)
Does not matter where you place it, it fails.
### What You Expected?
```
CREATE TABLE test_cluster_by
(
user_id LARGEINT NOT NULL,
username VARCHAR(50) NOT NULL,
city VARCHAR(20),
age SMALLINT,
sex TINYINT
)
UNIQUE KEY(user_id, username)
CLUSTER BY (city, age)
DISTRIBUTED BY HASH(user_id) BUCKETS 10
PROPERTIES (
"replication_num" = "1",
"enable_unique_key_merge_on_write" = "true"
);
```
returns
> [HY000][1105] errCode = 2, detailMessage = mismatched input 'CLUSTER' expecting {<EOF>, ';'}(line 10, pos 0
export it not to fail
### How to Reproduce?
```
CREATE TABLE test_cluster_by
(
user_id LARGEINT NOT NULL,
username VARCHAR(50) NOT NULL,
city VARCHAR(20),
age SMALLINT,
sex TINYINT
)
UNIQUE KEY(user_id, username)
CLUSTER BY (city, age)
DISTRIBUTED BY HASH(user_id) BUCKETS 10
PROPERTIES (
"replication_num" = "1",
"enable_unique_key_merge_on_write" = "true"
);
```
### Anything Else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [I] [Bug] REGRESSION in 4.1 for CLUSTER BY now errors on SQL parsing for UNIQUE KEY tables [doris]
Posted by "ixzc (via GitHub)" <gi...@apache.org>.
ixzc commented on issue #62727:
URL: https://github.com/apache/doris/issues/62727#issuecomment-4299758139
we are looking into this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [I] [Bug] REGRESSION in 4.1 for CLUSTER BY now errors on SQL parsing for UNIQUE KEY tables [doris]
Posted by "github-actions[bot] (via GitHub) via commits" <co...@doris.apache.org>.
github-actions[bot] closed issue #62727: [Bug] REGRESSION in 4.1 for CLUSTER BY now errors on SQL parsing for UNIQUE KEY tables
URL: https://github.com/apache/doris/issues/62727
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [I] [Bug] REGRESSION in 4.1 for CLUSTER BY now errors on SQL parsing for UNIQUE KEY tables [doris]
Posted by "apatrida (via GitHub)" <gi...@apache.org>.
apatrida commented on issue #62727:
URL: https://github.com/apache/doris/issues/62727#issuecomment-4310812315
ok, I'll try that. Note: https://doris.apache.org/docs/4.x/sql-manual/sql-statements/table-and-view/table/CREATE-TABLE?_highlight=create&_highlight=table
is out of date.
<img width="926" height="676" alt="Image" src="https://github.com/user-attachments/assets/9b70c563-6849-4c2f-a0b1-8c729499f04e" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [I] [Bug] REGRESSION in 4.1 for CLUSTER BY now errors on SQL parsing for UNIQUE KEY tables [doris]
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on issue #62727:
URL: https://github.com/apache/doris/issues/62727#issuecomment-4310931742
hi @apatrida , sorry for the confusing.
Actaully, the `cluster by` feature is not released before version 4.1.0. But indeed we update the doc at wrong time.
In 4.1.0, we change it to `order by`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [I] [Bug] REGRESSION in 4.1 for CLUSTER BY now errors on SQL parsing for UNIQUE KEY tables [doris]
Posted by "ixzc (via GitHub)" <gi...@apache.org>.
ixzc commented on issue #62727:
URL: https://github.com/apache/doris/issues/62727#issuecomment-4303114568
hi, actually, we support this since v4.1, for v4.0.x, it's just experiment feature. and in V4.1, you need to use `order by`, not `cluster by`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [I] [Bug] REGRESSION in 4.1 for CLUSTER BY now errors on SQL parsing for UNIQUE KEY tables [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #62727:
URL: https://github.com/apache/doris/issues/62727#issuecomment-6330377807
We're closing this issue because it hasn't been updated in a while.
If you'd like to revive this issue, please reopen it and feel free a maintainer to remove the Stale tag!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org