-
Notifications
You must be signed in to change notification settings - Fork 784
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
Add ArrowReaderOptions
to ParquetFileArrowReader
, add option to skip decoding arrow metadata from parquet (#1459)
#1558
Conversation
Fix inference from null logical type (apache#1557) Replace some `&Option<T>` with `Option<&T>` (apache#1556)
/// Returns the key value metadata, returns `None` if [`ArrowReaderOptions::skip_arrow_metadata`] | ||
fn get_kv_metadata(&self) -> Option<&Vec<KeyValue>> { | ||
if self.options.skip_arrow_metadata { | ||
return None; |
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 can't be written without the change in #1556 to move away from &Option<T>
@@ -690,6 +690,8 @@ impl ParquetTypeConverter<'_> { | |||
t.unit | |||
))), | |||
}, | |||
// https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#unknown-always-null | |||
(Some(LogicalType::UNKNOWN(_)), _) => Ok(DataType::Null), |
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 is the fix for #1557
assert_eq!(schema.field(0), &arrow_field); | ||
} | ||
|
||
#[test] |
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 is the closest I could get to a test of #1459 as we always write and decode the LogicalType, even when technically PARQUET_1_0 doesn't support it. The nature of thrift means this isn't actually a bug I don't think
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.
LGTM -- thanks @tustvold
Co-authored-by: Andrew Lamb <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #1558 +/- ##
==========================================
+ Coverage 82.83% 82.85% +0.02%
==========================================
Files 190 190
Lines 54957 55042 +85
==========================================
+ Hits 45521 45606 +85
Misses 9436 9436
Continue to review full report at Codecov.
|
ArrowReaderOptions
to ParquetFileArrowReader
, add option to skip decoding arrow metadata from parquet (#1459)
Which issue does this PR close?
Closes #1459
Closes #1557
Part of #1556
Rationale for this change
See tickets
What changes are included in this PR?
See tickets
Are there any user-facing changes?
Yes