docs: sync multimodal query-builder blob_mode snippet with test source#296
Merged
Conversation
The PyQueryToPandasKwargs snippet was out of sync with its test source in tests/py/test_multimodal.py, and its third example was factually wrong: a vector/FTS/hybrid query cannot materialize blob columns via to_pandas() for any blob_mode (including "descriptions") — blobs must be omitted from the projection. Rewrite test_query_to_pandas_kwargs as an async test that produces the corrected snippet (plain-scan lazy sync, plain-scan bytes async, and a vector query that omits the blob column while still forwarding split_blocks / self_destruct), add assertions, regenerate the snippet via make snippets, and fix the matching prose bullet on docs/tables/multimodal.mdx. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
docs/snippets/multimodal.mdx'sPyQueryToPandasKwargsexport was out of sync with its test source (tests/py/test_multimodal.py, markerquery_to_pandas_kwargs): the committed snippet showed a richerblob_modeexample, but the test only produced.to_pandas(split_blocks=True, self_destruct=True), somake snippetswould revert the snippet.While reconciling them I found the committed snippet's third example was factually wrong against the real API (
lancedb0.34.0 in Python): a vector/FTS/hybrid/ordered query cannot materialize blob columns throughto_pandas()for anyblob_mode— including"descriptions". Reading the lancedb source confirmed_plain_scan_to_pandasreturnsNonefor non-plain-scan queries, so it always raises when a blob column is in the projection. Blobs must be omitted from the projection for those query shapes.The
blob_modefeature is real and documented in the page prose, so the rich example is the intended content — I kept it and corrected it.Changes
tests/py/test_multimodal.py— rewrotetest_query_to_pandas_kwargsas an async test that produces the corrected three-block snippet: plain-scanlazy(sync), plain-scanbytes(async), and a vector query that omits the blob column while still forwardingsplit_blocks/self_destruct. Added assertions so the behavior is verified.docs/snippets/multimodal.mdx— regenerated viamake snippets(onlyPyQueryToPandasKwargschanged).docs/tables/multimodal.mdx— corrected the inaccurate prose bullet ("only supportblob_mode=\"descriptions\"") to match real behavior.Verification
pytest tests/py/test_multimodal.py→ 4 passed.make snippetsis idempotent — the snippet now matches its test source exactly.🤖 Generated with Claude Code