Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Cerrado
#4,639 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@raminqaf ya está trabajando en esto.

Desde el 14/10/2026.

  • #4635 de @raminqaf — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
java

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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!
Lenguaje dominante
Java
Estrellas
2.2k
Forks
656
Merge medio
2 d 21 h
PR fusionados (30 d)
97

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/fluss

Todos los issues de apache/fluss

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.