Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid double-take in some scenarios #3357

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

westonpace
Copy link
Contributor

The code was a little over-eager with regards to eager materialization. I think this was just a mistake from a recent refactor. This led to a double-take (also in the code). In most cases this double-take would be smoothed out by the double-take reducing optimization step. However, in some cases (e.g. if there was a limit between the takes) the takes weren't being combined.

We could improve the double-take optimization step to pushdown through a limit node but it was an easier to fix to avoid accidentally generating the double-take in the first place.

I added a test case for this in test_plans although that test case highlights another interesting optimization we could apply which is to push limits down into vector searches.

@github-actions github-actions bot added the bug Something isn't working label Jan 7, 2025
@westonpace westonpace merged commit ed8e76f into lancedb:main Jan 7, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants