Tustvold/extract parquet statistics#16
Merged
alamb merged 6 commits intoalamb:alamb/extract_parquet_statisticsfrom Nov 28, 2023
Merged
Conversation
* fix: wrong result of range function * fix test * add ut * add ut * nit * nit --------- Co-authored-by: zhongjingxiong <[email protected]>
* refactor: output-ordering * chore: test * chore: cr comment Co-authored-by: Alex Huang <[email protected]> --------- Co-authored-by: Alex Huang <[email protected]>
tustvold
commented
Nov 28, 2023
| /// | ||
| /// Note: This method currently ignores ColumnOrder (#8342) | ||
| pub(crate) fn prune_row_groups_by_statistics( | ||
| parquet_schema: &SchemaDescriptor, |
Author
There was a problem hiding this comment.
Tbh we need the full FileMetadata here in order to inspect the ColumnOrder - I decided against this as it would result in a load of test churn
| } | ||
|
|
||
| // This could be made more efficient (#TBD) | ||
| let parquet_idx = (0..parquet_schema.columns().len()) |
| return Ok(new_empty_array(self.field.data_type())); | ||
| } | ||
| /// Extracts the min statistics from an iterator of [`ParquetStatistics`] to an [`ArrayRef`] | ||
| pub fn min_statistics<'a, I: Iterator<Item = Option<&'a ParquetStatistics>>>( |
Author
There was a problem hiding this comment.
Originally I had this as ColumnChunkMetadata, however, we don't actually need anything beyond the ParquetStatistics, so it seemed peculiar to require the full ColumnChunkMetadata. Additionally one method to support the column index using the same array logic would be to coerce both kinds of statistics to the same representation
| pub(crate) struct RowGroupStatisticsConverter<'a> { | ||
| field: &'a Field, | ||
| /// Returns the parquet column index and the corresponding arrow field | ||
| pub fn parquet_column<'a>( |
Author
There was a problem hiding this comment.
This method is basically a hack, if/when we upstream this we can use the parquet-private ParquetField which handles this properly
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.
Which issue does this PR close?
Closes #.
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?