-
Notifications
You must be signed in to change notification settings - Fork 529
feat: support global tag retrieval and improve tag api #5088
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: support global tag retrieval and improve tag api #5088
Conversation
82553ab to
c9e6dfd
Compare
💡 Codex Reviewhttps://github.com/lancedb/lance/blob/82553ab6e87dd39ae60327920789a50db86caba7/java/lance-jni/src/blocking_dataset.rs#L1654-L1665 The new Java overloads allow ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
There's another issue that I don't feel right but might need some discussion. For now we use None to present the main branch. For example, we are in branch A:10, if we want to checkout A:9, we need to use I think most cases when people see None, maybe they are expecting no changes. So I think we might should to present None as the current branch instead of the main. On the other hand, we could use a constant string 'main' to present the main branch since we have reserved it. Although We store None for the main in the spec, we could provide better API for this. How do you feel about this? @jackye1995 If you agree I could do this in this PR |
|
Looks like there are 2 things here, (1) feels like from what you are describing that putting "None" is confusing, maybe we should just reserve the name (2) I agree that checkout_version(version_number) should better be against the current branch, we can improve that experience. |
88a0d50 to
efb3647
Compare
Sorry I think I didn't make myself clear enough. If we use We can transform an u64 to (current_branch, Some(version_number)), but will make the interface complicated(the Into trait doesn't have current branch, so we might need to split the api). If we make (None, Some(version_number)) just point to the current branch, it will make sense to the This is just an impl issue, but I think we better make these all matched and clear. WDYT? @jackye1995 |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
jackye1995
left a comment
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.
mostly looks good to me, pending rebase
96b9187 to
9c1597d
Compare
|
Hi, @jackye1995 I think there's a bug for current branch datasets. As we know we now use (str, u64) to identify a global version. if we are working on a branch and use interfaces like this: We will redirect to the main branch and get the transaction in that version line. On the other hand, everytime we use checkout_verson by a version_number, we are checking out the main branch which might be probably unexpected. I'm solving this issue by introducing a Please take a look on the newsest code when you have time |
6a72024 to
146ec75
Compare
yanghua
left a comment
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.
Left some comments.
|
Comments addressed, please take a look @yanghua |
yanghua
left a comment
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.
+1
|
@jackye1995 Please let me know if you have any further comments |
jackye1995
left a comment
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.
Looks good to me!
…5088) When I was planning the work lance-format#5073 . I found some uncompleted work: 1. Tag retrieval doesn't contain branch field both in Java and Python. 2. The reference parameter is not well used in scenarios including createTag, updateTag. And createBranch both in Java and Python. 3. For python, Tuple[str, int] is not the best type and lead to the api of checkout_branch. Use Tuple[Optional[str], Optional[int]] instead for more syntax expressions and remove checkout_branch. 4. Some necessary refactoring like removing all ref_
…5088) When I was planning the work lance-format#5073 . I found some uncompleted work: 1. Tag retrieval doesn't contain branch field both in Java and Python. 2. The reference parameter is not well used in scenarios including createTag, updateTag. And createBranch both in Java and Python. 3. For python, Tuple[str, int] is not the best type and lead to the api of checkout_branch. Use Tuple[Optional[str], Optional[int]] instead for more syntax expressions and remove checkout_branch. 4. Some necessary refactoring like removing all ref_
When I was planning the work #5073 . I found some uncompleted work: