Skip to content

Conversation

@sunxiaojian
Copy link
Collaborator

@sunxiaojian sunxiaojian commented May 19, 2025

What changes were proposed in this pull request?

Doris supports 'DISTRIBUTED BY HASH(dt_date) BUCKETS AUTO'

Why are the changes needed?

Fix: #(7185)

Does this PR introduce any user-facing change?

N/A

How was this patch tested?

org.apache.gravitino.catalog.doris.utils.TestDorisUtils#testDistributedInfoPattern
org.apache.gravitino.catalog.doris.integration.test.CatalogDorisIT#testAllDistributionWithAuto

@sunxiaojian sunxiaojian changed the title [#7185] Improvement(doris): Doris supports 'DISTRIBUTED BY HASH(dt_date) BUCKETS AUTO' [#7185] Improvement(doris): Doris supports 'DISTRIBUTED BY HASH(columnName) BUCKETS AUTO' May 19, 2025
@mchades mchades requested a review from yuqi1129 May 19, 2025 12:57
if (matcher.find(5)) {
bucketNum = Integer.valueOf(matcher.group(5));
}
// Default bucket number is 1. auto is -1.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also update the user doc to clarify this case?

BTW, how can a user create an auto-distributed Doris table by the Gravitino API?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mchades fixed , The Gravitino API can use Distributions.auto(Strategy.HASH, NamedReference.field("score"));.

@sunxiaojian sunxiaojian force-pushed the fixed-7185 branch 5 times, most recently from c6c4af3 to 9c050ac Compare May 21, 2025 04:00
@sunxiaojian
Copy link
Collaborator Author

@yuqi1129 @mchades PTAL

Copy link
Contributor

@yuqi1129 yuqi1129 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sunxiaojian
Copy link
Collaborator Author

@yuqi1129 @mchades Can you help merge it?

@yuqi1129 yuqi1129 merged commit 27eabaa into apache:main Jun 3, 2025
30 checks passed
vishnu-chalil pushed a commit to vishnu-chalil/gravitino that referenced this pull request Jul 14, 2025
…(columnName) BUCKETS AUTO' (apache#7186)

<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
   Examples:
     - "[apache#123] feat(operator): support xxx"
     - "[apache#233] fix: check null before access result in xxx"
     - "[MINOR] refactor: fix typo in variable name"
     - "[MINOR] docs: fix typo in README"
     - "[apache#255] test: fix flaky test NameOfTheTest"
   Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->

### What changes were proposed in this pull request?

Doris supports 'DISTRIBUTED BY HASH(dt_date) BUCKETS AUTO'

### Why are the changes needed?

Fix: #([7185](apache#7185))

### Does this PR introduce _any_ user-facing change?

N/A

### How was this patch tested?


org.apache.gravitino.catalog.doris.utils.TestDorisUtils#testDistributedInfoPattern

org.apache.gravitino.catalog.doris.integration.test.CatalogDorisIT#testAllDistributionWithAuto
hdygxsj pushed a commit to hdygxsj/gravitino that referenced this pull request Jul 15, 2025
…(columnName) BUCKETS AUTO' (apache#7186)

<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
   Examples:
     - "[apache#123] feat(operator): support xxx"
     - "[apache#233] fix: check null before access result in xxx"
     - "[MINOR] refactor: fix typo in variable name"
     - "[MINOR] docs: fix typo in README"
     - "[apache#255] test: fix flaky test NameOfTheTest"
   Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->

### What changes were proposed in this pull request?

Doris supports 'DISTRIBUTED BY HASH(dt_date) BUCKETS AUTO'

### Why are the changes needed?

Fix: #([7185](apache#7185))

### Does this PR introduce _any_ user-facing change?

N/A

### How was this patch tested?


org.apache.gravitino.catalog.doris.utils.TestDorisUtils#testDistributedInfoPattern

org.apache.gravitino.catalog.doris.integration.test.CatalogDorisIT#testAllDistributionWithAuto
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