-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-6194: [Java] Add non-static approach in DictionaryEncoder making it easy to extend and reuse #5055
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
Conversation
…o extend and reuse
Codecov Report
@@ Coverage Diff @@
## master #5055 +/- ##
==========================================
+ Coverage 87.59% 89.71% +2.12%
==========================================
Files 1009 670 -339
Lines 143898 99567 -44331
Branches 1418 0 -1418
==========================================
- Hits 126049 89329 -36720
+ Misses 17487 10238 -7249
+ Partials 362 0 -362
Continue to review full report at Codecov.
|
java/vector/src/main/java/org/apache/arrow/vector/dictionary/DictionaryEncoder.java
Show resolved
Hide resolved
java/vector/src/test/java/org/apache/arrow/vector/TestDictionaryVector.java
Show resolved
Hide resolved
|
@emkornfield PR has updated, would appreciate if you could take another look, thanks :) |
| /** | ||
| * Build hash table with dictionary vector. | ||
| */ | ||
| public void ensureBuildTable() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not put this in the constructor either in this class or in DictionaryEncoder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, fixe now, thanks.
|
+1, thank you. As noted on the mailing list please try to work with @liyafan82 to figure out the path forward on encoders in general. |
ok |
…g it easy to extend and reuse Related to [ARROW-6194](https://issues.apache.org/jira/browse/ARROW-6194). As discussed in apache#4994. Current static DictionaryEncoder has some limitation for extension and reuse. Slightly change the APIs and migrate static method to object based approach. Closes apache#5055 from tianchen92/ARROW-6194 and squashes the following commits: 2354c48 <tianchen> move build table logic to constructor 7b76cba <tianchen> add test 513f417 <tianchen> add static method back fb2d293 <tianchen> ARROW-6194: Make DictionaryEncoder non-static making it easy to extend and reuse Authored-by: tianchen <[email protected]> Signed-off-by: Micah Kornfield <[email protected]>
Related to ARROW-6194.
As discussed in #4994.
Current static DictionaryEncoder has some limitation for extension and reuse.
Slightly change the APIs and migrate static method to object based approach.