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

feat: add fragments option to the scanner itself #877

Merged
merged 6 commits into from
May 18, 2023

Conversation

wjones127
Copy link
Contributor

@wjones127 wjones127 commented May 18, 2023

To support setting other scanner options along with the fragments, add fragments as an argument in the scanner itself.

@wjones127 wjones127 marked this pull request as ready for review May 18, 2023 16:42
@wjones127 wjones127 requested a review from eddyxu May 18, 2023 16:43
if isinstance(f, LanceFragment):
inner_fragments.append(f._fragment)
else:
raise TypeError("fragments must be an iterable of LanceFragment")
Copy link
Contributor

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?

# 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.",
Copy link
Contributor

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?

Copy link
Contributor

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=...)?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@wjones127 wjones127 merged commit 1408b91 into main May 18, 2023
@wjones127 wjones127 deleted the wjones127/with_fragments branch May 18, 2023 18:26
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.

2 participants