-
Notifications
You must be signed in to change notification settings - Fork 245
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
feat: add fragments option to the scanner itself #877
Conversation
python/python/lance/dataset.py
Outdated
if isinstance(f, LanceFragment): | ||
inner_fragments.append(f._fragment) | ||
else: | ||
raise TypeError("fragments must be an iterable of LanceFragment") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add a message to tell user what the current type of f
is , for easy debugging?
python/python/lance/dataset.py
Outdated
# TODO: can we take kwargs here for the scanner builder? | ||
# TODO: peek instead of list | ||
warnings.warn( | ||
"Deprecated in version 0.4.13. Use the fragments argument in LanceDataset.scanner() instead.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might only have 1-2 users are using this method. Let's make sure they know, and we can delete this method in a few versions later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this method is semi-private
method, right? so users dont directly use it, instead they use Dataset.scanner(fragments=...)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dataset.scanner(fragments=...)
doesn't use this function, so if no one is using from_fragments()
we can delete it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sg. Let's delete it then.
To support setting other scanner options along with the fragments, add
fragments
as an argument in the scanner itself.