Skip to content

build: upgrade to Lance 12.0.0-beta.18 and lance-namespace 0.11.1 - #819

Open
FANNG1 wants to merge 2 commits into
lance-format:mainfrom
FANNG1:chore/upgrade-lance-12
Open

FANNG1 wants to merge 2 commits into
lance-format:mainfrom
FANNG1:chore/upgrade-lance-12

Conversation

@FANNG1

@FANNG1 FANNG1 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades lance-core from 11.0.0-beta.21 to 12.0.0-beta.18. lance-core 12.x is built against lance-namespace 0.11.1, so lance-namespace moves from 0.8.6 to 0.11.1 in the same change — keeping 0.8.6 fails to compile the tests, because DirectoryNamespace (shipped inside lance-core) references response types that do not exist in 0.8.6.

This is a dependency upgrade only; no new connector features.

Behavior changes absorbed

Lance/namespace change What this PR does
LanceNamespace.queryTable returns QueryTableResponse instead of byte[]; namespaceExists/tableExists return responses Unwrap with .getData(); update the two test fakes
Update.updateMode is now mandatory — the transaction protobuf cannot persist "absent" distinctly from RewriteRows, so the JNI rejects an empty mode Position-delta writes (SparkPositionDeltaWrite, 3.4 and 3.5) state RewriteRows explicitly, which is what an absent mode always meant
Lance's default file format version is now 2.2, which rejects legacy (v1) blob columns outright A table that requests <col>.lance.encoding = 'blob' without pinning file_format_version is now created at 2.1, so it keeps the documented v1 behavior instead of failing the write
stable / next resolve to 2.2 or newer BlobUtils.fileFormatSupportsBlobV2 recognizes them, so those tables get blob v2 instead of falling through to v1 and being rejected at write time
Lance rejects null struct values at file format version 2.0 instead of silently reading them back as non-null structs with null children testNullStructV2_0ReadsAsEmptyStruct becomes testNullStructV2_0IsRejected
STABLE resolves to 2.2 The two STABLE assertions in BaseSparkConnectorWriteTest no longer hard-code 2.0/2.1

The blob-encoding rule is the only user-visible change, and it was chosen to keep existing pipelines byte-identical: without it, every CREATE TABLE ... TBLPROPERTIES ('x.lance.encoding' = 'blob') that does not pin a version would start failing. Users who want blob v2 already have to set file_format_version explicitly, per the docs. docs/src/config.md and docs/src/operations/ddl/create-table.md are updated.

Testing

Full module test suites, all green:

  • lance-spark-3.5_2.12 — 1400 tests, 0 failures, 0 errors
  • lance-spark-3.4_2.12 — 1253 tests, 0 failures, 0 errors
  • lance-spark-4.2_2.13 — 1456 tests, 0 failures, 0 errors
  • whole reactor test-compile passes; spotless:check clean

https://claude.ai/code/session_011gFXXNur56ZyJhu3qdRMcr

@github-actions github-actions Bot added the chore Features related to test, build, style improvements label Sep 13, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gate recommendation: approve.

The dependency and API adaptations match Lance 12: namespace responses are unwrapped, position deltas state RewriteRows, and unversioned legacy blob requests pin to 2.1 while stable/next select blob v2. Keeping those unversioned tables on 2.1 is preferable to silently migrating them to blob v2 because it preserves the existing table contract while explicit table or catalog versions remain authoritative. The changed paths are documented and covered by real-dataset tests across representative Spark/Scala seams.

lance-core 12.x is built against lance-namespace 0.11.1, so the two move
together. Both bumps carry behavior changes that the connector has to
absorb:

- `LanceNamespace.queryTable` now returns `QueryTableResponse` instead of
  `byte[]`, and `namespaceExists`/`tableExists` return responses too.
- `Update.updateMode` is now mandatory. Lance previously inferred
  `RewriteRows` from an absent mode but the transaction protobuf cannot
  persist "absent" distinctly, so the JNI rejects it. Position-delta
  writes state `RewriteRows` explicitly, which is what they always meant.
- Lance's default file format version is now 2.2, which rejects legacy
  (v1) blob columns outright. A table that asks for `<col>.lance.encoding
  = 'blob'` without pinning `file_format_version` is now created at 2.1
  so it keeps the documented v1 behavior instead of failing the write.
- `stable` and `next` resolve to 2.2 or newer, so they now select blob v2
  rather than falling through to v1 and being rejected at write time.
- Lance rejects null struct values at file format version 2.0 instead of
  silently reading them back as non-null structs with null children.
  `testNullStructV2_0ReadsAsEmptyStruct` becomes a rejection test.

Verified: full test suites green on lance-spark-3.5_2.12 (1400),
lance-spark-3.4_2.12 (1253) and lance-spark-4.2_2.13 (1456); the whole
reactor test-compiles.

Claude-Session: https://claude.ai/code/session_011gFXXNur56ZyJhu3qdRMcr
@FANNG1
FANNG1 force-pushed the chore/upgrade-lance-12 branch from a92fc01 to 0b50255 Compare September 14, 2026 23:32
The Spark 4.2 / Scala 2.13 integration job failed on
TestDDLIndex::test_create_btree_index_on_int with a Lance external-sort
memory exhaustion. That test also failed this way on lance-format#825, which only
touched docker files on lance-core 11, and passed on its next run, so it
is a resource-dependent flake rather than anything this branch changes.
Re-running to confirm.

Claude-Session: https://claude.ai/code/session_011gFXXNur56ZyJhu3qdRMcr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Features related to test, build, style improvements K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant