Skip to content

Add an API to provide the reason / what is being requested in IO #8157

@alamb

Description

@alamb

So we basically have a 2nd file parser here 🤔 I'm wondering if instead of creating yet-another-parser -- even though it's partial -- we could ask the decoder to provide us a "reason" or a "trace" on the individual read requests. For example, we could extend AsyncFileReader with an implemented-by-default method:

trait AsyncFileReader {
   // all the current methods stay!

   fn get_bytes_with_trace(&mut self, range: Range<u64>, trace: Trace) -> BoxFuture<'_, parquet::errors::Result<Bytes>> {
        // ignore trace by default
        self.get_bytes(range)
   }

   // same for the other two methods...
}

// bikeshed whatever `Trace` is, maybe use :http::Extensions?

Originally posted by @crepererum in #7971 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changelogparquetChanges to the parquet crate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions