Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove EOFException catch block from the Avro decoders #15018

Merged

Conversation

abhishekrb19
Copy link
Contributor

@abhishekrb19 abhishekrb19 commented Sep 20, 2023

With Avro 1.11.1, the read() method only throws IOException.
This PR removes the old EOFException catch block and now only has an Exception block to catch IOException or other classes of exceptions, which is then thrown as a generic ParseException.

Also, did a minor cleanup of surrounding exception messages around interpolations and capitalization. Added unit tests to tests different parsing errors.

This PR has:

  • been self-reviewed.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.

Copy link
Contributor

@soumyava soumyava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abhishekrb19 abhishekrb19 marked this pull request as draft September 21, 2023 02:38
@abhishekrb19 abhishekrb19 changed the title Remove stale comment referencing an old Avro version Replace EOFException block with IOException block in the Avro extension Sep 21, 2023
@zachjsh zachjsh self-requested a review September 21, 2023 16:02
Copy link
Contributor

@zachjsh zachjsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀, but looks like its missing some test coverage 😢

@abhishekrb19 abhishekrb19 removed the WIP label Sep 21, 2023
@abhishekrb19 abhishekrb19 marked this pull request as ready for review September 21, 2023 16:47
@abhishekrb19
Copy link
Contributor Author

Thanks for the reviews! Updated the PR with additional tests that were missing and cleaned up the exception handling code a little bit.

@abhishekrb19 abhishekrb19 changed the title Replace EOFException block with IOException block in the Avro extension Remove EOFException catch block from the Avro decoders Sep 21, 2023
@abhishekrb19 abhishekrb19 merged commit ba6101a into apache:master Sep 25, 2023
46 checks passed
@abhishekrb19 abhishekrb19 deleted the remove_stale_comment_avro_version branch September 25, 2023 15:38
@LakshSingla LakshSingla added this to the 28.0 milestone Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants