Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File URI Scheme Interpretation #2562

Closed
tustvold opened this issue May 17, 2022 · 2 comments · Fixed by #2578
Closed

File URI Scheme Interpretation #2562

tustvold opened this issue May 17, 2022 · 2 comments · Fixed by #2578
Labels
enhancement New feature or request

Comments

@tustvold
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

The file URI scheme implemented in ObjectStoreRegistry does not appear to follow the specification described in RFC 3986.

In particular:

  • It does not handle the host component
  • It accepts non-absolute paths

Describe the solution you'd like

The file:// URIs should be handled in a spec-compliant way. Unfortunately this on its own would prevent the use of local paths, which would likely be annoying for users.

I would therefore propose we special case URIs without a scheme, and canonicalise them within ObjectStoreRegistry.

Describe alternatives you've considered

We could not do this

Additional context

I encountered this whilst working on #2489, as the object_store crate purposefully does not handle relative paths.

Thoughts @yahoNanJing @thinkharderdev

@tustvold tustvold added the enhancement New feature or request label May 17, 2022
@thinkharderdev
Copy link
Contributor

Makes sense. This also came up in apache/datafusion-ballista#481 where we had a regression when we stripped the schema from file URIs. We actually use the scheme to resolve the correct ObjectStore when deserializing plans in Ballista.

@alamb
Copy link
Contributor

alamb commented May 17, 2022

cc @andygrove and @mingmwang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants