apache / apache/opendal

suggestion: impl debug for reader, writer and more metadata

Open
#6,076 1 comment 3 reactions 0 assignees View on GitHub
core enhancement releases-note/feat
Dominant language
Rust
Stars
5.4k
Forks
825
Avg merge
1d 14m
Merged PRs (30d)
127

Description

### Feature Description

@Xuanwo i was working the side to prepare a PR which allows opendal as an external byte source for Polars.

While doing this i came across a few limitation which need `Debug` to be implemented for `Reader` and `Writer`. For now I have implemented these on my end directly, but i was thinking if these can be implemented directly in core since `ReadContext` is private, maybe some non critical metadata can be exposed?

### Problem and Solution

With this I also have the following suggestions,

- When reader is created, maybe a stat call can be triggered eagerly which exposes the `Metadata` object as a field in reader. The reader can fail eagerly if the object doesn't exist on this basis.
- as i remember, this eager call is anyways triggered when user passes byte range as `..`, so might as well do this beforehand.
- Metadata has a lot of info already but some things like scheme, prefix, and fully qualified path are still missing, but they're available in the `ReaderContext`.

What do you think?

### Additional Context

Ref: https://github.com/apache/opendal/discussions/5972

### Are you willing to contribute to the development of this feature?

- [ ] Yes, I am willing to contribute to the development of this feature.

Contributor guide

Open the contributing guide

Research direction

Start by reading the Reader, Writer, ReadContext, ReaderContext, and Metadata APIs, then review discussion #5972 for the intended scope. Done requires agreement on the debug output, eager metadata behavior, and additional metadata fields before implementing and validating the selected changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.