Skip to content

ObjectStore parse_url Incorrectly Handles URLs with Spaces #113

@tustvold

Description

@tustvold

Describe the bug

ObjectStore::parse_url does not correctly decode URL paths, resulting in incorrect behaviour for paths containing spaces (or other non URL-safe characters).

To Reproduce

Expected behavior

#[test]
fn test_url_spaces() {
    let url = Url::parse("file:///my file with spaces").unwrap();
    assert_eq!(url.path(), "/my%20file%20with%20spaces");
    let (_, path) = parse_url(&url).unwrap();
    assert_eq!(path.as_ref(), "my file with spaces");
}

Additional context

Relates to apache/datafusion#8012 and apache/datafusion#7877

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions