Skip to content

docs: sync multimodal query-builder blob_mode snippet with test source#296

Merged
prrao87 merged 1 commit into
mainfrom
claude/silly-austin-1e2c27
Jul 3, 2026
Merged

docs: sync multimodal query-builder blob_mode snippet with test source#296
prrao87 merged 1 commit into
mainfrom
claude/silly-austin-1e2c27

Conversation

@prrao87

@prrao87 prrao87 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What & why

docs/snippets/multimodal.mdx's PyQueryToPandasKwargs export was out of sync with its test source (tests/py/test_multimodal.py, marker query_to_pandas_kwargs): the committed snippet showed a richer blob_mode example, but the test only produced .to_pandas(split_blocks=True, self_destruct=True), so make snippets would revert the snippet.

While reconciling them I found the committed snippet's third example was factually wrong against the real API (lancedb 0.34.0 in Python): a vector/FTS/hybrid/ordered query cannot materialize blob columns through to_pandas() for any blob_mode — including "descriptions". Reading the lancedb source confirmed _plain_scan_to_pandas returns None for 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_mode feature 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 — rewrote test_query_to_pandas_kwargs as an async test that produces the corrected three-block 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. Added assertions so the behavior is verified.
  • docs/snippets/multimodal.mdx — regenerated via make snippets (only PyQueryToPandasKwargs changed).
  • docs/tables/multimodal.mdx — corrected the inaccurate prose bullet ("only support blob_mode=\"descriptions\"") to match real behavior.

Verification

  • The exact snippet code runs green against real filesystem-backed tables.
  • pytest tests/py/test_multimodal.py4 passed.
  • make snippets is idempotent — the snippet now matches its test source exactly.

🤖 Generated with Claude Code

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>
@mintlify

mintlify Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lancedb-bcbb4faf 🟢 Ready View Preview Jul 3, 2026, 9:17 PM

@prrao87 prrao87 merged commit 43d62fb into main Jul 3, 2026
2 checks passed
@prrao87 prrao87 deleted the claude/silly-austin-1e2c27 branch July 3, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant