Skip to content

ValueStatistics methods can't be used from generic context in external crate #8823

@pmarks

Description

@pmarks

The bound on ValueStatistics is T: ParquetValueType, which isn't public. So it is impossible to call the methods on ValueStatistics from a generic function in another crate, forcing the use of macros to generate a call for each concrete type. The impl of ValueStatistics will compile is the bound is AsBytes, so I will send a PR for that.

I want a more ergonomic way to interact with Statistics - right now you either have to use Statistics::min_bytes_opt and do your own conversion, or use StatisticsConverter, which is an inconvenient API shape for my use case.

The alternative would be to make ParquetValueType be public, which seems like a much bigger commitement and is not necessary in this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions