apache / apache/beam

@DefaultCoder annotation should work with Create

Open
#18,348 0 comments 0 reactions 0 assignees View on GitHub
bug core java P3
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

From user@beam.apache.org:

"My class is declared as follows:

@DefaultCoder(SerializableCoder.class) public class Data implements Serializable {

and it fails like this:

Caused by: org.apache.beam.sdk.coders.CannotProvideCoderException: Cannot provide coder based on value with class my.project.Data: No CoderFactory has been registered for the class."

It seems like this should work, though Create's value-based coder inference has more limitations and safety issues than usual coder inference. To investigate.

Imported from Jira [BEAM-1736](https://issues.apache.org/jira/browse/BEAM-1736). Original Jira may contain additional context.
Reported by: kenn.

Contributor guide

Open the contributing guide

Research direction

The issue names Apache Beam's Create transform, value-based coder inference, and the @DefaultCoder annotation, but no files or tests. Start by tracing Create's coder inference and compare it with the reported Data example; done means determining whether the annotation should be honored without CannotProvideCoderException and documenting or covering the resulting behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.