Skip to content

Join a description table into image similarity results#13

Merged
FANNG1 merged 1 commit into
mainfrom
image-desc-join
Jul 7, 2026
Merged

Join a description table into image similarity results#13
FANNG1 merged 1 commit into
mainfrom
image-desc-join

Conversation

@FANNG1

@FANNG1 FANNG1 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Stacked on #12. Builds the multi-table scenario: a description table (doc_id → description) is joined into image similarity search results.

  • --desc-table <uri> on the image query CLI: accepts a plain parquet/jsonl/csv file or a Lance table — Daft reads it directly as the join side, no ingestion step needed.
  • Text-to-image (--text), image-to-image (--image-path / --image-from) and scalar results gain a description column via left join on doc_id — images without a description stay in the results with description = null.
  • With --sql, the table is registered in the SQL scope as descriptions for hand-written joins (... FROM images i LEFT JOIN descriptions d ON i.doc_id = d.doc_id).
  • README gains a runnable scenario (generate descriptions.parquet in a few lines of code, then query with --desc-table).

Testing

  • New tests/image/test_desc_join.py: text/doc similarity with joined descriptions, missing-description → null, extra doc_ids in the description table ignored, manual SQL join, and a regression that omitting --desc-table keeps existing output shape.
  • uv run pytest tests/ -q → 77 passed.

Note: base is image-similarity-search; retarget to main and rebase after #12 merges.

Base automatically changed from image-similarity-search to main July 7, 2026 01:34
Adds --desc-table to the image query CLI: a doc_id → description table
(plain parquet/jsonl/csv file or a Lance table) is left-joined into the
results of text-to-image and image-to-image similarity search (and the
scalar mode, for consistency), adding a description column. Images
without a description stay in the results with description = null.
With --sql, the table is registered in the SQL scope as `descriptions`
for hand-written joins.

The scenario needs no extra ingestion step — Daft reads the parquet
file directly as the join side.
@FANNG1 FANNG1 force-pushed the image-desc-join branch from 206306c to ee3b34e Compare July 7, 2026 01:36
@FANNG1

FANNG1 commented Jul 7, 2026

Copy link
Copy Markdown
Owner Author

Rebased onto main after #12 merged; base retargeted to main. Full suite green locally (78 passed).

@FANNG1 FANNG1 merged commit 63e3650 into main Jul 7, 2026
1 check passed
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