avro icon indicating copy to clipboard operation
avro copied to clipboard

AVRO-3504: New method "skip_data" for DataFileReader

Open izveigor opened this issue 3 years ago • 0 comments

DatumReader has method "skip_data" which skips data with the help of a decoder. I suggest applying this method for DataFileReader to skip a lot of useless data.

New method "skip_data" for DataFileReader would accept the argument "number" which means number of datums that need skip.

Test for new fixture was written in "test_datafile.py". The test removes 50 misses from coverage.

Make sure you have checked all steps below.

Jira

  • [x] My PR addresses the following Avro Jira issues and references them in the PR title. For example, "AVRO-1234: My Avro PR"
    • https://issues.apache.org/jira/browse/AVRO-XXX
    • In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.

Tests

  • [x] My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • [ ] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • [x] In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain Javadoc that explain what it does

izveigor avatar Apr 23 '22 12:04 izveigor