apache / apache/beam

Coder is not verified as deterministic in ApproximateUnique.java

Open
#20,536 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

Calling input.getCoder() does not verify that the coder is deterministic. A possible example where this could present a problem is if the user's data is float, as the float coder is not deterministic [1].

[1] https://github.com/apache/beam/blob/4d7df122ca053828bd2c7dffa9f390ba2bd8678e/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/FloatCoder.java#L70

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

Contributor guide

Open the contributing guide

Research direction

Start in ApproximateUnique.java by tracing the input.getCoder() call, then read the linked FloatCoder.java reference to understand the determinism concern. Locate the relevant Java test coverage and verify that nondeterministic coders are handled as intended; done means the behavior is covered by a passing test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.