Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[flink] DISTRIBUTED BY is silently ignored when creating tables and materialized tables

Đã đóng
#4,639 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@raminqaf đang làm issue này rồi.

Từ ngày 14/10/2026.

  • #4635 của @raminqaf — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
data-engineering

Hướng nghiên cứu

Start in FlinkConversions#toFlussTable, which reads buckets only from the bucket.key and bucket.num options and never reads getDistribution(). Compare it with the Flink DynamicSinkUtils#validateBucketing guard, and check the per-version adapters for Flink 1.18 through 2.2. Done means DISTRIBUTED BY HASH(k) INTO n BUCKETS maps to key k and count n, while RANGE and conflicting options are rejected. Open pull request #4635 already targets this, so coordinate with it before starting.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Search before asking
  • I searched in the issues and found nothing similar.
Fluss version

main (development)

Please describe the bug 🐞

The Fluss catalog ignores the DISTRIBUTED BY clause, so the table gets the default bucket count and bucket key. This also affects the 1.0.0 release.

CREATE TABLE orders (
  id INT, region STRING, amt INT, PRIMARY KEY (id, region) NOT ENFORCED
) DISTRIBUTED BY HASH(id) INTO 4 BUCKETS;
Declared Created today
DISTRIBUTED BY HASH(id) INTO 4 BUCKETS Bucket key id, region, server default bucket count
DISTRIBUTED BY RANGE(id) INTO 4 BUCKETS Accepted, the clause is dropped
DISTRIBUTED BY ... plus 'bucket.num' Accepted, the clause is dropped

FlinkConversions#toFlussTable reads buckets only from the bucket.key and bucket.num options and never reads getDistribution(). Flink has a guard: DynamicSinkUtils#validateBucketing rejects distributed tables whose sink lacks SupportsBucketing. That guard never fires here, because the table read back from Fluss has no distribution.

This affects CREATE TABLE since Flink 1.20 (FLIP-376) and CREATE MATERIALIZED TABLE since Flink 2.2 (FLIP-542).

Solution

Map DISTRIBUTED BY HASH(k) INTO n BUCKETS to bucket key k and bucket count n. DISTRIBUTED INTO n BUCKETS sets only the count. Reject RANGE, and reject combining the clause with the bucket.key or bucket.num options. Flink 1.18 and 1.19 have no DISTRIBUTED BY, so their adapters return nothing. ALTER TABLE ... MODIFY DISTRIBUTION is out of scope. It keeps failing with the existing "Unsupported flink table change" error.

Are you willing to submit a PR?
  • I'm willing to submit a PR!
Ngôn ngữ chính
Java
Star
2.2k
Fork
658
Merge trung bình
2 ngày 23 giờ
Pull request đã merge (30 ngày)
101

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/fluss

Tất cả issue của apache/fluss

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.