Skip to content

fix: return Arrow JSON from FileFragment.take#7471

Open
xloya wants to merge 1 commit into
lance-format:mainfrom
xloya:upstream-pr/json-dataset-fragment-take
Open

fix: return Arrow JSON from FileFragment.take#7471
xloya wants to merge 1 commit into
lance-format:mainfrom
xloya:upstream-pr/json-dataset-fragment-take

Conversation

@xloya

@xloya xloya commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Problem

FileFragment.take (and dataset take) returns JSON columns as raw Lance JSONB instead of the logical Arrow JSON type.

Root cause

The take path returned the stored Lance JSON (LargeBinary/JSONB) bytes without converting back to Arrow JSON (Utf8).

Fix

After take_rows, convert Lance JSON columns back to Arrow JSON via convert_lance_json_to_arrow when JSON fields are present.

Test

Python test_take_with_json_column (dataset) and test_fragment_take_with_json_column.

@github-actions github-actions Bot added A-python Python bindings bug Something isn't working labels Jun 25, 2026
@xloya xloya force-pushed the upstream-pr/json-dataset-fragment-take branch from e4683e4 to 6a92052 Compare June 25, 2026 08:06
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance/src/dataset/fragment.rs 80.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

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

Labels

A-python Python bindings bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant