Skip to content

Don't ensure_table_uri when creating a table with_log_store #2036

@gruuya

Description

@gruuya

Description

Currently when a CreateBuilder is provided with a log store, it will try to create a URL from it's root (via ensure_table_uri), and then re-convert that to a String

let (storage_url, table) = if let Some(log_store) = self.log_store {
(
ensure_table_uri(log_store.root_uri())?.as_str().to_string(),
DeltaTable::new(log_store, Default::default()),
)

Besides potentially create missing dirs in the case of local FS, I don't think this round trip is actually needed in other cases (e.g. cloud URLs).

The issue this leads to for us is that ensure_table_uri in turn calls resolve_uri_type, which errors out if the URL scheme is not for one of the registered object store factories.

Use Case

I'd like to be able to use with_log_store on the CreateBuilder without having to register an object store factory beforehand.

In other words I'd like to be able to re-use the object/log store that I keep an Arc to without re-creating one from scratch every time.

Related Issue(s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    binding/rustIssues for the Rust crateenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions