Potential issue with QuantileStateCoder
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 196
Description
[https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ApproximateQuantiles.java#L687](https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ApproximateQuantiles.java#L687)
The line above encodes the QuantileState buffers.size() as if it's numBuffers. This seems wrong since before buffers are full, buffers.size() is not equal to numBuffers. One thing I suspect will happen is that, if we serialize before buffer is full, it will effectively reduce the number of buffers we maintain after deserialization.
Imported from Jira [BEAM-4667](https://issues.apache.org/jira/browse/BEAM-4667). Original Jira may contain additional context.
Reported by: zhihengh.
Contributor guide
Assessment
This issue has not been assessed yet.