Use fast varint read path in LongInputStreamV1#13607
Merged
highker merged 1 commit intoprestodb:masterfrom Oct 28, 2019
Merged
Conversation
d48d62c to
9a7cf26
Compare
highker
reviewed
Oct 26, 2019
There was a problem hiding this comment.
lastReadInputCheckpoint is never used anymore. Could you remove?
There was a problem hiding this comment.
Could you give a more meaningful name for this?
Do not decode varints that are skipped over and do not maintain a buffer of possibly unused values. Use the OrcInputStream varint methods to read or skip only what is needed.
9a7cf26 to
ce6ef48
Compare
Author
|
I addressed the comments. I numInRun -> numValuesInRun. This was in Bhavani’s last verifier run and did not make new bugs.
From: James Sun <notifications@github.com>
Sent: Saturday, October 26, 2019 12:55 AM
To: prestodb/presto <presto@noreply.github.com>
Cc: oerling <erling@xs4all.nl>; Author <author@noreply.github.com>
Subject: Re: [prestodb/presto] Use fast varint read path in LongInputStreamV1 (#13607)
@highker commented on this pull request.
minor comment only; otherwise LGTM
_____
In presto-orc/src/main/java/com/facebook/presto/orc/stream/LongInputStreamV1.java <#13607 (comment)> :
@@ -41,8 +40,7 @@ public LongInputStreamV1(OrcInputStream input, boolean signed)
lastReadInputCheckpoint = input.getCheckpoint();
lastReadInputCheckpoint is never used anymore. Could you remove?
_____
In presto-orc/src/main/java/com/facebook/presto/orc/stream/LongInputStreamV1.java <#13607 (comment)> :
}
if (repeat) {
- result = literals[0] + (used++) * delta;
+ result = repeatBase + (used) * delta;
remove (): used * delta
_____
In presto-orc/src/main/java/com/facebook/presto/orc/stream/LongInputStreamV1.java <#13607 (comment)> :
private final OrcInputStream input;
private final boolean signed;
- private final long[] literals = new long[MAX_LITERAL_SIZE];
- private int numLiterals;
+ private long repeatBase;
+ private int numInRun;
Could you give a more meaningful name for this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#13607?email_source=notifications&email_token=AKPPPT6XZTICVF56GCIHZ7TQQPZUBA5CNFSM4JFFZFZKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCJKFEWY#pullrequestreview-307515995> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AKPPPT4KXYGXNUXFHKUMC3TQQPZUBANCNFSM4JFFZFZA> .
|
This was referenced Nov 11, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Do not decode varints that are skipped over and do not maintain a
buffer of possibly unused values. Use the OrcInputStream varint
methods to read or skip only what is needed.