apache/beam

In WithKeys, get coder for key more safely.

Open

#18.571 aberto em 3 de jun. de 2022

Ver no GitHub
 (2 comments) (0 reactions) (0 assignees)Java (4.097 forks)batch import
P3coregood first issueimprovementjava

Métricas do repositório

Stars
 (7.313 stars)
Métricas de merge de PR
 (Mesclagem média 6d) (243 fundiu PRs em 30d)

Description

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.

Guia do colaborador