Skip to content

fix: support reading and writing JSON columns - #813

Open
vgrigoriu wants to merge 1 commit into
lance-format:mainfrom
vgrigoriu:vgrigoriu/push-tvzqtwvtnqsm
Open

fix: support reading and writing JSON columns#813
vgrigoriu wants to merge 1 commit into
lance-format:mainfrom
vgrigoriu:vgrigoriu/push-tvzqtwvtnqsm

Conversation

@vgrigoriu

@vgrigoriu vgrigoriu commented Sep 8, 2026

Copy link
Copy Markdown

Add Spark support for Lance JSON columns.

JSON is exposed to Spark as  StringType  with the canonical  arrow.json  extension marker, while Lance persists it as JSONB (LargeBinary with lance.json). The connector recognizes the physical schema returned by  lance-core , maps it to Spark’s logical representation, and writes JSON strings back using Arrow’s  arrow.json  extension so Lance can encode them correctly.

Includes test coverage for schema inference, reading/querying JSON text, appending to existing JSON columns, Spark read/write round-trips, preserving ordinary string columns, and verifying Spark-created JSON columns use Lance’s physical JSONB representation.

@github-actions github-actions Bot added the bug Something isn't working label Sep 8, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Sep 8, 2026
@vgrigoriu
vgrigoriu force-pushed the vgrigoriu/push-tvzqtwvtnqsm branch from 0358d8c to 57c6bc8 Compare September 10, 2026 06:57
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Sep 10, 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 previously reported CREATE TABLE property mismatch is fixed: the unsupported helper and its claim were removed. The connector now consistently maps Lance’s physical lance.json/LargeBinary representation to Spark StringType metadata and writes canonical arrow.json UTF-8 fields; the real-dataset schema, read, append, and round-trip paths are covered across the supported shared implementation.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant