Conversation
lance-core 12 declares lance-namespace 0.11.1, so lance-namespace.version moves from 0.8.6 to 0.11.1 alongside it. lance-core bundles namespace implementations compiled against 0.11.1, and leaving the pin at 0.8.6 fails to resolve org.lance.namespace.model classes. Adapt to the API changes this pulls in: - LanceNamespace.queryTable now returns QueryTableResponse rather than byte[]; unwrap with getData() in LanceSearchColumnarPartitionReader. - namespaceExists/tableExists return response objects rather than void; update the namespace test doubles accordingly. - Update operations must set updateMode explicitly, since the transaction format cannot persist an absent mode distinctly from RewriteRows. Both SparkPositionDeltaWrite copies now pass RewriteRows, matching the behaviour absence previously implied. - STABLE now resolves to file version 2.2, so widen the storage version assertions. - File version 2.0 rejects null structs instead of silently reading them back as non-null structs with null children, so assert the failure. Verified against 12.0.0-beta.18, as 12.0.0-rc.1 is not yet published to Maven Central. Nine BlobCreateTableTest/BlobJoinTest/BlobV2CopyTest cases still fail: file version 2.2 drops the legacy "lance-encoding:blob" encoding and requires the blob v2 extension type, which is a separate migration. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017acNiGMFxRXWVGnpkFFdhK
Lance 12 resolves the default and stable file format versions to 2.2, and 2.2 rejects the legacy "lance-encoding:blob" encoding outright. The blob version check treated an unset version and named aliases as unable to store blob v2, so those tables were written with legacy blob metadata and failed at creation. Treat an unset version and stable as blob v2 capable, matching what Lance resolves them to. An explicit version below 2.2 still selects the legacy encoding, which remains valid at those versions. legacy maps to 0.1 and keeps returning false. The blob v1 suites create their tables without a version, so they now pin 2.1 to go on exercising the v1 path, including the __blob_size and __blob_pos virtual columns that blob v2 replaces with descriptor struct fields. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017acNiGMFxRXWVGnpkFFdhK
There was a problem hiding this comment.
The v12 API, namespace, transaction, and default/stable blob changes are aligned and exercised across the supported build matrix. The valid next file-format alias still selects legacy blob metadata, so blob table creation fails; users can pin stable or 2.3 as a mitigation.
Please mark this PR with the breaking-change label.
| String[] parts = fileFormatVersion.trim().split("\\."); | ||
|
|
||
| String trimmed = fileFormatVersion.trim(); | ||
| if (trimmed.isEmpty() || STABLE_FILE_FORMAT_VERSION.equalsIgnoreCase(trimmed)) { |
There was a problem hiding this comment.
next is also a valid Lance selector and resolves to file format 2.3, but this branch returns false for it. That selects lance-encoding:blob and CREATE TABLE fails instead of creating blob v2. Recognizing next here (or delegating alias resolution when lance-core exposes it) makes aliases follow the same ≥2.2 contract. Users can currently recover by pinning stable or 2.3, so this is non-blocking.
Reproducer
Against this head, run:
spark.sql(
"CREATE TABLE lance_ns.default.blob_next (id INT, data BINARY) USING lance "
+ "TBLPROPERTIES ('data.lance.encoding' = 'blob', "
+ "'file_format_version' = 'next')");Expected: the table is created with lance.blob.v2 metadata.
Observed: IllegalArgumentException: Legacy blob columns ... are not supported for file version >= 2.2.
|
#819 overlaps this almost exactly — same adaptations, pinned to
The one real difference is blob encoding when no version is pinned. We agree on FWIW #819 is green on beta.18 including all seven integration jobs. |
Summary
Bumps
lance.versionfrom11.0.0-beta.21to12.0.0-rc.1and adapts the connector to the API and behaviour changes that come with it.lance-core12 declareslance-namespace0.11.1 and bundles namespace implementations compiled against it, solance-namespace.versionhas to move from 0.8.6 to 0.11.1 at the same time — leaving the pin at 0.8.6 fails to resolveorg.lance.namespace.modelclasses.API changes
queryTable(...)→.getData()LanceNamespace.queryTablenow returnsQueryTableResponserather thanbyte[]namespaceExists/tableExistsreturn response objects rather thanvoidRewriteRowsupdate mode in bothSparkPositionDeltaWritecopiesupdateModeexplicitly — the transaction format cannot persist an absent mode distinctly fromRewriteRows, so this preserves what absence previously impliedSTABLEnow resolves to file version 2.2The
updateModechange alone accounts for 58 of the 70 test failures the bump initially caused.Blob v2
Lance 12 resolves both the default and
stablefile format versions to 2.2, and 2.2 rejects the legacylance-encoding:blobencoding outright.BlobUtils.fileFormatSupportsBlobV2treated an unset version and named aliases as unable to store blob v2, so those tables were written with legacy blob metadata and then failed at creation. It now treats unset andstableas blob v2 capable, matching what Lance resolves them to. An explicit version below 2.2 still selects the legacy encoding, which remains valid there, andlegacymaps to 0.1 and still returns false.This changes the default blob encoding for tables created without an explicit
file_format_version: they now get blob v2 and read back as descriptor structs rather than rawBINARY. Tables that need the v1 encoding must pin a version below 2.2.docs/src/config.mdis updated to match.The blob v1 suites created their tables without a version, so they now pin
2.1to go on exercising the v1 path, including the__blob_sizeand__blob_posvirtual columns that blob v2 replaces with descriptor struct fields.Test status
./mvnw test -pl lance-spark-3.5_2.13 -am→ 1397 tests, 0 failures, 0 errors.The same classes are green on
11.0.0-beta.21, andlance-spark-3.4_2.12,lance-spark-4.0_2.13andlance-spark-4.2_2.13all test-compile.Why this is still a draft
org.lance:lance-core:12.0.0-rc.1is not published to Maven Central. Thev12.0.0-rc.1Java publish workflow has not completed — the tag is several hours old and Central's newestlance-coreis still12.0.0-beta.18. CI cannot resolve the dependency until that lands, and it may be worth checking whether that release job is stuck.Everything above was therefore verified against
12.0.0-beta.18, which shares the v12 API surface. The pin needs re-verifying against the realrc.1artifact once it publishes.🤖 Generated with Claude Code
https://claude.ai/code/session_017acNiGMFxRXWVGnpkFFdhK