Reduce code duplication in Arrow code#2746
Merged
rymurr merged 6 commits intoapache:masterfrom Jul 12, 2021
Merged
Conversation
ed4ca7e to
0addb2c
Compare
0addb2c to
0652940
Compare
Contributor
Author
|
@rymurr it is probably easier looking at the modified files directly instead of looking at the diff when reviewing. |
0652940 to
4ddd3fa
Compare
Contributor
Author
Results on branch
|
rymurr
reviewed
Jul 8, 2021
| class DictionaryIdReader extends BaseDictEncodedReader { | ||
| @Override | ||
| protected void nextVal(FieldVector vector, Dictionary dict, int idx, int currentVal, int typeWidth) { | ||
| ((IntVector) vector).set(idx, currentVal); |
Contributor
There was a problem hiding this comment.
Any reason this is cast to IntVector and the others are directly manipulating the data buffer?
Contributor
Author
There was a problem hiding this comment.
Dictionary encoded vectors are always represented as IntVector, but since BaseDictEncodedReader uses the more generic FieldVector we need to do a cast to IntVector here. Fwiw, here's how it was done in the original code:
rymurr
approved these changes
Jul 9, 2021
Contributor
rdblue
reviewed
Jul 9, 2021
arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedColumnIterator.java
Outdated
Show resolved
Hide resolved
Contributor
|
I'm fine either way. Whatever you'd like to do. |
5ebdd4c to
6c12d43
Compare
rymurr
approved these changes
Jul 12, 2021
Contributor
|
note - rebasing to keep each atomic class refactor as a separate (revertible) commit |
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.
No description provided.