Skip to content

feat: add append_or_create mode to LanceDataSink - #96

Open
qingfeng-occ wants to merge 1 commit into
daft-engine:mainfrom
qingfeng-occ:append_or_create
Open

qingfeng-occ wants to merge 1 commit into
daft-engine:mainfrom
qingfeng-occ:append_or_create

Conversation

@qingfeng-occ

Copy link
Copy Markdown
Contributor

Summary

Adds an append_or_create mode to LanceDataSink: append if the dataset exists, create it otherwise. Resolves to the existing create/append paths, so no new write/commit logic.

Implementation

Lance's write_fragments only accepts create/append/overwrite, so the mode is resolved in _absorb_existing_dataset() (which already detects whether the dataset exists):

  • Missing → _write_mode = "create"
  • Exists → _write_mode = "append" (with the usual schema check)
    Resolution happens in start(), so the physical write and commit paths are unchanged.

Closes: #95

@qingfeng-occ
qingfeng-occ marked this pull request as draft November 20, 2026 09:06
@qingfeng-occ
qingfeng-occ force-pushed the append_or_create branch 2 times, most recently from 151a3aa to 06054e7 Compare November 21, 2026 02:47
@qingfeng-occ
qingfeng-occ marked this pull request as ready for review November 21, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

write_lance lacks a mode that appends and auto-creates the dataset on first run

1 participant