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] Fetch dataset versions. #280

Merged
merged 2 commits into from
Nov 2, 2022
Merged

[Python] Fetch dataset versions. #280

merged 2 commits into from
Nov 2, 2022

Conversation

eddyxu
Copy link
Contributor

@eddyxu eddyxu commented Nov 2, 2022

Provide version(), versions(), latest_version() methods to Python

@eddyxu eddyxu requested a review from changhiskhan November 2, 2022 04:16
@eddyxu eddyxu self-assigned this Nov 2, 2022
@eddyxu eddyxu added the python label Nov 2, 2022
Copy link
Contributor

@changhiskhan changhiskhan left a comment

Choose a reason for hiding this comment

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

Oh man this is exciting

@@ -158,6 +161,17 @@ cdef extern from "lance/arrow/dataset.h" namespace "lance::arrow" nogil:
optional[uint64_t] version,
)

CDatasetVersion version() const;
Copy link
Contributor

Choose a reason for hiding this comment

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

How come this is not wrapped in CResult?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, so this is fetching the "current version", which is converting from already loaded Manifest. There is no I/O involved , so no error case in this code path.

@eddyxu eddyxu merged commit 499c31a into main Nov 2, 2022
@eddyxu eddyxu deleted the lei/py_versions branch November 2, 2022 05:30
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