apache/beam

In WithKeys, get coder for key more safely.

Open

#18.571 geöffnet am 3. Juni 2022

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Java (4.097 Forks)batch import
P3coregood first issueimprovementjava

Repository-Metriken

Stars
 (7.313 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T) (243 gemergte PRs in 30 T)

Beschreibung

In WithKeys.java currently the coder for the key type is chosen when the transform is expanded. This means that there's no way to directly get the type of the input elements, instead the type is inferred from the function or from a java Class<> object. This means there can be mismatches between the actual type of the input and the coder used.

WithKeys should be refactored to retrieve the coder in a safer way and avoid the possibility of mismatches.

Imported from Jira BEAM-3003. Original Jira may contain additional context. Reported by: danoliveira.

Contributor Guide