Use case
We manage Lance tables through an Apache Gravitino Lance REST
server, which implements the Lance Namespace REST
protocol. The catalog owns the table hierarchy (catalog.schema.table), decides each table's
storage location, and can vend object-store credentials to clients via describe_table.
On the compute side we use Daft (with daft-lance) for multimodal data processing over these
tables: distributed reads, bulk writes, column backfill via merge_columns_df (e.g. adding
embedding columns), scalar index builds, and compaction.
Today every daft-lance entry point addresses a table by raw URI only. That forces us to:
- resolve
table_id -> storage location out of band before every job, and keep that resolution
logic in every pipeline;
- distribute object-store credentials to jobs ourselves, even though the catalog can vend
scoped credentials per table;
- give up the catalog's create/commit integration (tables written by Daft are not registered
back into the namespace).
Proposal
Add Lance Namespace addressing to daft-lance: every table-addressing entry point
(read_lance, write_lance, merge_columns, merge_columns_df, create_scalar_index,
compact_files) accepts a namespace triple as an alternative to uri:
import daft_lance
ns = {
"namespace_impl": "rest",
"namespace_properties": {"uri": "http://gravitino-host:9101/lance"},
}
daft_lance.write_lance(df, table_id=["catalog", "schema", "orders"], mode="create", **ns)
df = daft_lance.read_lance(table_id=["catalog", "schema", "orders"], **ns)
Key requirements from our production scenario:
- Distributed-safe: namespace clients are not picklable; workers must be able to rebuild
the client from serializable parameters.
- Credential vending: storage options returned by the namespace must reach every dataset
open/commit, layered with the user's io_config as fallback.
- Correct create semantics against a real catalog:
declare_table registration, tolerance
for declared-only placeholder tables (some servers materialize a stub at declare time),
and no catalog side effects at plan-construction time.
- Works with pylance >= 7, which accepts
namespace_client + table_id natively.
Implementation
We have an implementation of the above in #35, validated against both the dir namespace and
a Gravitino Lance REST server (gated e2e test). Filing this issue to describe the motivating
scenario and gather feedback on the API surface.
Use case
We manage Lance tables through an Apache Gravitino Lance REST
server, which implements the Lance Namespace REST
protocol. The catalog owns the table hierarchy (
catalog.schema.table), decides each table'sstorage location, and can vend object-store credentials to clients via
describe_table.On the compute side we use Daft (with daft-lance) for multimodal data processing over these
tables: distributed reads, bulk writes, column backfill via
merge_columns_df(e.g. addingembedding columns), scalar index builds, and compaction.
Today every daft-lance entry point addresses a table by raw URI only. That forces us to:
table_id -> storage locationout of band before every job, and keep that resolutionlogic in every pipeline;
scoped credentials per table;
back into the namespace).
Proposal
Add Lance Namespace addressing to daft-lance: every table-addressing entry point
(
read_lance,write_lance,merge_columns,merge_columns_df,create_scalar_index,compact_files) accepts a namespace triple as an alternative touri:Key requirements from our production scenario:
the client from serializable parameters.
open/commit, layered with the user's
io_configas fallback.declare_tableregistration, tolerancefor declared-only placeholder tables (some servers materialize a stub at declare time),
and no catalog side effects at plan-construction time.
namespace_client+table_idnatively.Implementation
We have an implementation of the above in #35, validated against both the
dirnamespace anda Gravitino Lance REST server (gated e2e test). Filing this issue to describe the motivating
scenario and gather feedback on the API surface.