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

Python: Add initial TableScan implementation #6145

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

Fokko
Copy link
Contributor

@Fokko Fokko commented Nov 8, 2022

This adds an implementation of TableScan that is an alternative to the one in #6131. This doesn't implement plan_files, it is just to demonstrate a possible scan API:

scan = table.scan(
    row_filter=In("id", [5, 6, 7]),
    selected_fields=("id", "data"),
    snapshot_id=1234567890
)

@github-actions github-actions bot added the python label Nov 8, 2022
):
self.table = table
self.row_filter = row_filter or AlwaysTrue()
self.partition_filter = partition_filter or AlwaysTrue()
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good.

Copy link
Contributor

@rdblue rdblue left a comment

Choose a reason for hiding this comment

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

This looks good to me, except that it left out the scan refinement methods. I think those should be included so you can use the same refinement strategy that the JVM API supports.

@Fokko
Copy link
Contributor Author

Fokko commented Nov 10, 2022

Also threw in some tests 👍🏻

@rdblue rdblue merged commit f54a10c into apache:master Nov 10, 2022
@rdblue
Copy link
Contributor

rdblue commented Nov 10, 2022

Thanks, @Fokko!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants