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

Fix reading large SequenceFile, RCFile, or Avro files #18837

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

electrum
Copy link
Member

@electrum electrum commented Aug 28, 2023

Release notes

(x) Release notes are required, with the following suggested text:

# Hive
* Fix reading large SequenceFile, RCFile, or Avro files. ({issue}`18837`)

Fixes #17890

@cla-bot cla-bot bot added the cla-signed label Aug 28, 2023
@electrum electrum requested a review from dain August 28, 2023 19:11
@wendigo
Copy link
Contributor

wendigo commented Aug 28, 2023

@electrum can we have a test for it?

@electrum
Copy link
Member Author

I'm not sure how to test this other than generating a 2GB+ file, which would negatively impact the CI, and doesn't seem to be worth the cost.

@electrum electrum merged commit 9926d4e into trinodb:master Aug 30, 2023
@electrum electrum deleted the hive-reader branch August 30, 2023 03:28
@github-actions github-actions bot added this to the 426 milestone Aug 30, 2023
@@ -230,10 +232,14 @@ public int read()
public long skip(long length)
throws IOException
{
if (length <= 0) {
return 0;
Copy link
Member

Choose a reason for hiding this comment

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

for length == 0, it's obvious.
why also for length < 0? is it worth explanatory comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the behavior specified in the Javadoc and in the default implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

IllegalArgumentException: Size is greater than maximum int value when reading big file
5 participants