Skip to content

spike: add LazyBackend#1655

Open
mesejo wants to merge 1 commit intomainfrom
feat/lazy-backend
Open

spike: add LazyBackend#1655
mesejo wants to merge 1 commit intomainfrom
feat/lazy-backend

Conversation

@mesejo
Copy link
Collaborator

@mesejo mesejo commented Mar 1, 2026

No description provided.

@codecov
Copy link

codecov bot commented Mar 1, 2026

Codecov Report

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

Files with missing lines Patch % Lines
python/xorq/backends/tests/test_lazy_backend.py 98.11% 2 Missing ⚠️
Files with missing lines Coverage Δ
python/xorq/backends/_lazy.py 100.00% <100.00%> (ø)
python/xorq/catalog/tar_utils.py 100.00% <ø> (ø)
python/xorq/ibis_yaml/compiler.py 96.30% <100.00%> (+0.02%) ⬆️
python/xorq/ibis_yaml/tests/test_lazy_load_expr.py 100.00% <100.00%> (ø)
python/xorq/vendor/ibis/backends/profiles.py 92.53% <100.00%> (+0.34%) ⬆️
python/xorq/backends/tests/test_lazy_backend.py 98.11% <98.11%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 1, 2026

Merging this PR will not alter performance

✅ 14 untouched benchmarks


Comparing feat/lazy-backend (a6d158c) with main (3118066)

Open in CodSpeed

@mesejo mesejo changed the title feat: add LazyBackend spike: add LazyBackend Mar 2, 2026
@mesejo mesejo force-pushed the feat/lazy-backend branch 10 times, most recently from 0705b84 to 18781f2 Compare March 13, 2026 11:39
Wraps any unconnected backend instance and defers do_connect() until
the first attribute access. Uses double-checked locking for thread
safety and a __class__ property override so isinstance() checks against
the wrapped backend's type continue to pass.

Includes 12 tests covering connection lifecycle, thread safety,
isinstance compatibility, attribute delegation, and a full DuckDB
file-based roundtrip.

Also integrates LazyBackend into the expression loading pipeline:
- Profile.get_lazy_con() returns a LazyBackend wrapping an unconnected
  backend, deferring do_connect until first use

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mesejo mesejo force-pushed the feat/lazy-backend branch from 18781f2 to a6d158c Compare March 13, 2026 11:54
@mesejo mesejo marked this pull request as ready for review March 13, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant