[ https://issues.apache.org/jira/browse/FLINK-11915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Biao Liu updated FLINK-11915: ----------------------------- Affects Version/s: 1.6.3 1.6.4 1.7.2 1.8.0 Fix Version/s: 1.9.0 > 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 > Fix For: 1.9.0 > > > 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)