Skip to content

feature: support writing external blob v2 references #816

Description

@Xuanwo

Allow Spark to write external blob references directly, preserving the URI as an external reference instead of requiring callers to materialize the asset bytes or update the column later through another binding. This is useful when registering media that already exists in object storage.

The logical blob shape supports data, uri, position, and size, but the connector currently exposes only the binary-payload write path. External writes were explicitly deferred in #539; this issue tracks that follow-up.

With a configured Lance catalog and an existing namespace, this SQL was tested on 8780cbdab386b40b9ba515264597a02fd027f11a (Spark 3.5 / Scala 2.13, Lance Java 11.0.0-beta.21):

CREATE TABLE lance_ns.default.external_blob_probe
(content STRUCT<data:BINARY,uri:STRING,position:BIGINT,size:BIGINT>)
USING lance TBLPROPERTIES
('content.lance.encoding'='blob', 'file_format_version'='2.2');

Creation fails with Blob column 'content' must have BINARY type. This rejection was asserted in a local test using the existing BaseBlobCreateTableTest setup.

There are also downstream restrictions:

Provide a documented external-reference input path for create and append, including whole-object URIs and explicit ranges. Preserve existing binary writes and delegate logical blob validation to Lance core where possible. Tests should verify that the stored descriptor remains external and that reading resolves the intended object or range.

Cross-bucket credential vending is a separate concern: accepting an external reference must not imply that access to the referenced location has been granted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions