Skip to content

fix: make index() use table-bound expressions for plain ibis (#275) - #319

Open
mathisdrn wants to merge 1 commit into
boringdata:mainfrom
mathisdrn:fix/issue-275-plain-ibis-index
Open

mathisdrn wants to merge 1 commit into
boringdata:mainfrom
mathisdrn:fix/issue-275-plain-ibis-index

Conversation

@mathisdrn

Copy link
Copy Markdown

Fixes #275.

Problem

index() in src/boring_semantic_layer/ops/_core.py failed on plain-Ibis backends and no-xorq environments due to xorq-specific selector usage (s.all()) and unbound ibis._ deferred expressions in index value/weight construction.

Fix

  • Replace unbound deferred expressions and xorq selector calls in _allocate_index_value_alias, _get_weight_expr, _build_string_index_fragment, _build_numeric_index_fragment, _get_fields_to_index, SemanticIndexOp.values, and SemanticIndexOp.to_untagged with table-bound expressions.
  • Add plain-Ibis index() tests in src/boring_semantic_layer/tests/test_plain_ibis.py (TestPlainIbisIndex) and update src/boring_semantic_layer/tests/test_index.py.

Verification

  • ruff check . and ruff format --check . passed.
  • .venv/bin/pytest -q src/boring_semantic_layer/tests/test_index.py src/boring_semantic_layer/tests/test_plain_ibis.py src/boring_semantic_layer/tests/test_import_graph.py: 47 passed, 1 skipped.

Note: This PR is AI-generated and human-reviewed.

This branch has not been deployed

No deployments
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.

index() crashes with RecursionError on plain ibis backends

1 participant