[flink] DISTRIBUTED BY is silently ignored when creating tables and materialized tables
Maintainer thường phản hồi trong vòng 1 ngày
Đá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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/fluss
-
[lake/iceberg] Reserved write-mode properties can be set and reset through their `iceberg.` keyCó thể đã có người làm @aphenix-r7 đã nhận 8 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
apache/fluss#4658 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[common] Decimal#hashCode is inconsistent with Decimal#equalsCó thể đã có người làm @firasbouzazi đã nhận 20 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/fluss#4538 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[security] PlainSaslServerProvider conflicts with Hadoop SASL provider causing authentication failureCó thể đã có người làm @xinzhang-hello đã nhận 26 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[server] KV snapshot scheduling stops permanently after a transient snapshot-init failureCó thể đã có người làm @zhang-arvin đã nhận 25 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
apache/fluss#4489 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[docs] Document advertised-resource and ACL principal ignore-case optionsCó thể đã có người làm @EchoLee5 đã nhận 38 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
dev/release: verify-release-candidate.sh runs 0 Java tests with Debian's MavenCó thể đã có người làm @kou đã nhận hôm nay. Đang mởType: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/arrow-adbc#4947 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
lysine-dev/okhttp#9814 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
checkstyle/checkstyle#22153 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày