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

chore(python): add docstring for limit behavior #800

Merged
merged 3 commits into from
Jan 10, 2024

Conversation

changhiskhan
Copy link
Contributor

Closes #796

Copy link
Contributor

@westonpace westonpace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve barring the change about limit == 0

Comment on lines +273 to +276
*WARNING* if you have a large dataset, removing
the limit can potentially result in reading a
large amount of data into memory and cause
out of memory issues.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if I call to_batches?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have to_batches api yet. I'll create a follow-up issue


Returns
-------
LanceQueryBuilder
The LanceQueryBuilder object.
"""
self._limit = limit
if limit is None or limit < 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if limit == 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made limit == 0 also act as if there's no limit

@changhiskhan changhiskhan merged commit 2774065 into main Jan 10, 2024
11 checks passed
@changhiskhan changhiskhan deleted the changhiskhan/doc-limit branch January 10, 2024 04:20
koolamusic pushed a commit to tecmie/lancedb that referenced this pull request Jan 12, 2024
raghavdixit99 pushed a commit to raghavdixit99/lancedb that referenced this pull request Apr 5, 2024
raghavdixit99 pushed a commit to raghavdixit99/lancedb that referenced this pull request Apr 5, 2024
westonpace pushed a commit that referenced this pull request Apr 5, 2024
westonpace pushed a commit that referenced this pull request Apr 5, 2024
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.

Document "no limit" behavior for LanceQueryBuilder
2 participants