Repository navigation
Add read_parquet_metadata libcudf API - #13663
Conversation
|
Hello @etseidl would you please share your thoughts on this first PQ metadata function? |
vuule
left a comment
There was a problem hiding this comment.
Looks pretty good! I really like the extent in which aggregate_reader_metadata was used.
Some minor suggestions.
| * @return parquet_metadata with parquet schema, number of rows, number of row groups and key-value | ||
| * metadata. | ||
| */ | ||
| parquet_metadata read_parquet_metadata(std::vector<std::unique_ptr<datasource>>&& sources); |
There was a problem hiding this comment.
Do we want to make read_parquet_metadata uncallable with l-values (as it is now)? We don't really have to move from the sources, IMO const& is fine here.
There was a problem hiding this comment.
Replaced with const-ref.
It's good for what it is, but for my purposes I'd need something more akin to returning the entire |
@etseidl |
|
Looking at #11214, sounds like we'd want to add information about each row group. I'm fine with this being in a separate PR. |
vuule
left a comment
There was a problem hiding this comment.
Looks great, just need to iron out the get_key_value_metadata overload set.
Thank you for addressing previous comments!
| return _current_read_chunk < _chunk_read_info.size(); | ||
| } | ||
|
|
||
| static parquet_column_schema walk_schema(aggregate_reader_metadata const* mt, int idx) |
There was a problem hiding this comment.
Can we use an anonymous namespace instead?
| } | ||
|
|
||
| namespace { | ||
| static parquet_column_schema walk_schema(aggregate_reader_metadata const* mt, int idx) |
There was a problem hiding this comment.
| static parquet_column_schema walk_schema(aggregate_reader_metadata const* mt, int idx) | |
| parquet_column_schema walk_schema(aggregate_reader_metadata const* mt, int idx) |
There was a problem hiding this comment.
why not static?
There was a problem hiding this comment.
There was a problem hiding this comment.
As far as I can tell, it's not a member function of a class, so there is no static internal state you are relying on.
static on free functions prevents leakage across multiple TUs, but using an anonymous namespace provides the same benefit and is more in line with other libcudf code.
What were your reasons for using static, if it's something different?
|
/merge |
Description
Closes #11675
Adds
read_parquet_metadatato libcudf.The metadata has following information
To Reviewers: Request for adding more information in metadata. Refer #11214
Checklist