Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa
#4,639 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@raminqaf ci sta già lavorando.

Dal 14/10/2026.

  • #4635 di @raminqaf — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
java

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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!
Lingua principale
Java
Stelle
2.2k
Fork
656
Merge medio
2g 21h
PR unite (30g)
97

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/fluss

Tutte le issue di apache/fluss

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.