-
Notifications
You must be signed in to change notification settings - Fork 164
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
chore: Refactor Arrow Array and Schema allocation in ColumnReader and MetadataColumnReader #1047
Conversation
@@ -52,7 +52,6 @@ const STR_CLASS_NAME: &str = "java/lang/String"; | |||
/// Parquet read context maintained across multiple JNI calls. | |||
struct Context { | |||
pub column_reader: ColumnReader, | |||
pub arrays: Option<(Arc<FFI_ArrowArray>, Arc<FFI_ArrowSchema>)>, |
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.
This refactoring simplifies the context and the logic. We don't need to keep the array and schema pointers in the producer side.
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.
It is also easier to reason the array/schema release logic after this refactoring.
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.
Looks good
cometVector, dictionary, importer.getProvider(), useDecimal128, false, isUuid); | ||
|
||
currentVector = | ||
new CometDictionaryVector(cometVector, dictionary, importer.getProvider(), useDecimal128); |
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.
Unrelated but we should not be needing to call CometDictionaryVector
twice
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1047 +/- ##
============================================
+ Coverage 34.28% 34.32% +0.03%
- Complexity 881 887 +6
============================================
Files 112 113 +1
Lines 43478 43588 +110
Branches 9648 9647 -1
============================================
+ Hits 14908 14963 +55
- Misses 25481 25552 +71
+ Partials 3089 3073 -16 ☔ View full report in Codecov by Sentry. |
7d7f388
to
583aed6
Compare
Thanks @kazuyukitanimura |
Which issue does this PR close?
Closes #1048.
Rationale for this change
What changes are included in this PR?
How are these changes tested?