apache / apache/datafusion

`AsRef<Url>` as argument is practically unusable

Open
#18,220 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

Currently, [datafusion::execution::runtime_env::RuntimeEnv::object_store](https://docs.rs/datafusion/latest/datafusion/execution/runtime_env/struct.RuntimeEnv.html#method.object_store) takes an `impl AsRef`. Neither `Url` nor `&Url` implement this trait, so I am confused as to how I am supposed to use this. I ended up passing a `Box`, but I doubt that is the intended way to go. I think it should take a `&Url` instead. If `AsRef` is actually the intended type, then an example of how to use this would be nice.

Contributor guide

Open the contributing guide

Research direction

Start with the RuntimeEnv::object_store API and its documentation at the linked docs.rs entry, then inspect how its AsRef argument is intended to be called. Done means either Url and &Url can be passed as expected or the documentation includes a clear working example of the intended usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.