-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-51771][SQL][FOLLOWUP] Rename currentVersion to version in DSv2 Table #53118
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
Conversation
dongjoon-hyun
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.
cc @gengliangwang , @viirya , @cloud-fan , @szehon-ho from the original PR.
|
|
||
| /** | ||
| * Returns the current table version if implementation supports versioning. | ||
| * Returns this table version without refreshing state if implementation supports versioning. |
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.
Hmm, can you explain more why to specify specially on "without refreshing state"? Does currentVersion implicitly refresh state possibly? I suppose currentVersion just returns the current version, and don't expect it will refresh state.
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, without refreshing state is confusing
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.
How about
/**
* Returns the current table version if the implementation supports versioning.
* The returned value is not automatically refreshed.
* If the table is not versioned, this method may return null.
*/
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
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.
The returned value -> This table instance
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.
Yeah, the whole purpose of the rename is to make sure connectors DO NOT automatically refresh the underlying table state. In other words, it must act like a guidance for connectors.
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.
What about this, folks?
/**
* Returns the version of this table if versioning is supported, null otherwise.
* <p>
* This method must not trigger a refresh of the table metadata. It should return
* the version that corresponds to the current state of this table instance.
*/
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.
I want to avoid the word current as this may not be current and can be behind the version in the metastore.
|
Gentle ping, @aokolnychyi . |
|
Please address the review comments and get approvals if you really want to make this change at Apache Spark 4.1.0, @aokolnychyi . |
|
@dongjoon-hyun, updated. Sorry about the delay, I was updating other PRs too. |
|
Thank you, @aokolnychyi . |
dongjoon-hyun
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, LGTM.
… Table ### What changes were proposed in this pull request? This PR renames `currentVersion` to `version` in DSv2 `Table`. This method is supposed to be a simple getter and must not trigger a refresh of the underlying table state. ### Why are the changes needed? These changes are needed to avoid ambiguity in the about to be released API in 4.1. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #53118 from aokolnychyi/spark-51771-followup. Authored-by: Anton Okolnychyi <aokolnychyi@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit 6578b9b) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
|
I don't think the test failure is relevant: |
|
Merged to master/4.1 for Apache Spark 4.1.0. |
|
Thank you, @dongjoon-hyun @gengliangwang @cloud-fan @viirya! |
|
Ya, @aokolnychyi . I checked the first commit and second commit result. The failed ones are different. They look like flaky ones. |
… Table ### What changes were proposed in this pull request? This PR renames `currentVersion` to `version` in DSv2 `Table`. This method is supposed to be a simple getter and must not trigger a refresh of the underlying table state. ### Why are the changes needed? These changes are needed to avoid ambiguity in the about to be released API in 4.1. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#53118 from aokolnychyi/spark-51771-followup. Authored-by: Anton Okolnychyi <aokolnychyi@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
… Table ### What changes were proposed in this pull request? This PR renames `currentVersion` to `version` in DSv2 `Table`. This method is supposed to be a simple getter and must not trigger a refresh of the underlying table state. ### Why are the changes needed? These changes are needed to avoid ambiguity in the about to be released API in 4.1. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#53118 from aokolnychyi/spark-51771-followup. Authored-by: Anton Okolnychyi <aokolnychyi@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
What changes were proposed in this pull request?
This PR renames
currentVersiontoversionin DSv2Table. This method is supposed to be a simple getter and must not trigger a refresh of the underlying table state.Why are the changes needed?
These changes are needed to avoid ambiguity in the about to be released API in 4.1.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing tests.
Was this patch authored or co-authored using generative AI tooling?
No.