[
https://issues.apache.org/jira/browse/FLINK-11915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Till Rohrmann resolved FLINK-11915.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.8.1
1.7.3
Fixed via
1.9.0: 8a174833bee081f4f4a24caa5ddc5fe45996de13
1.8.1: f8a214008089d62e3bd12db857cd059367b54dd1
1.7.3: 2e97865e4b95ac0fba1471d29eaf56675d799164
> DataInputViewStream skip returns wrong value
> --------------------------------------------
>
> Key: FLINK-11915
> URL: https://issues.apache.org/jira/browse/FLINK-11915
> Project: Flink
> Issue Type: Bug
> Components: Formats (JSON, Avro, Parquet, ORC, SequenceFile),
> Runtime / Operators
> Affects Versions: 1.6.3, 1.6.4, 1.7.2, 1.8.0
> Reporter: Andrew Prudhomme
> Assignee: Biao Liu
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.7.3, 1.9.0, 1.8.1
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The
> flink-core:org.apache.flink.api.java.typeutils.runtime.DataInputViewStream
> overrides the InputSteam skip function. This function should be returning the
> actual number of bytes skipped, but there is a bug which makes it return a
> lower value.
> The fix should be something simple like:
> {code:java}
> - return n - counter - inputView.skipBytes((int) counter);
> + return n - (counter - inputView.skipBytes((int) counter));
> {code}
> For context, I ran into this when trying to decode an Avro record where the
> writer schema had fields not present in the reader schema. The decoder would
> attempt to skip the unneeded data in the stream, but would throw an
> EOFException because the return value was wrong.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)