-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-30226][SQL] Remove withXXX functions in WriteBuilder #26678
Conversation
…titions-information-2
Do I need to open a new JIRA for this @cloud-fan ? |
ok to test |
@edrevo yes, please create a new JIRA |
sql/catalyst/src/main/java/org/apache/spark/sql/connector/write/LogicalWriteInfo.java
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/java/org/apache/spark/sql/connector/write/LogicalWriteInfo.java
Show resolved
Hide resolved
Test build #114460 has finished for PR 26678 at commit
|
@edrevo any updates? |
Sorry for the delay @cloud-fan , I'll pick this up again this week |
Test build #115199 has finished for PR 26678 at commit
|
@cloud-fan , I have addressed your PR feedback. |
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/StagedTable.java
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/StagingTableCatalog.java
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/java/org/apache/spark/sql/connector/write/LogicalWriteInfo.java
Outdated
Show resolved
Hide resolved
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/csv/CSVTable.scala
Outdated
Show resolved
Hide resolved
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.
LGTM except a few minor comments
Test build #115218 has finished for PR 26678 at commit
|
ping @edrevo |
Test build #115519 has finished for PR 26678 at commit
|
Test build #115520 has finished for PR 26678 at commit
|
@cloud-fan, latest PR feedback addressed |
I don't see a compelling reason to change the API again this close to a release. Why does this need to happen? What is the benefit? The only one I see is minor and in my opinion not worth the extra churn. |
I've posted the reason a long time ago: #26591 (comment) I think it's not minor and is an important change. It can avoid us making mistakes like adding a We haven't cut branch yet so it's not too late. |
I think there are other ways to ensure you're using a builder correctly. For one thing, adding validations to the internal implementations makes sense. In general, we need to stop making breaking changes to the API simply because it is marginally better. |
I think an argument here is if it's marginally better or much better. I think it's much better. Another question is: when should we stop making breaking changes to V2? We have made so many API changes for DS v2 in Spark 3.0 and I'm confused why we can't make API changes now? If there is a point that we should stop making breaking changes, it should be the branch cut. Before that, I think it's worth to make API changes even if it's slightly better. We don't have chances to fix these small API problems anymore after branch cut. |
There is a proposal to do branch cut on Jan 31, so we still have more than a month to add new features. Since we all agree that this is an improvement(minor or significant), shall we get this in? |
retest this please |
Test build #116135 has finished for PR 26678 at commit
|
retest this please |
Test build #116143 has finished for PR 26678 at commit
|
It has been over 2 weeks and no more objections so far. Since this is an improvement (type-safe is better than manual check) and DS v2 API change is not a concern before branch cut, I'm merging it to master. Please keep leaving comments if you have different opinions. Thanks! |
What changes were proposed in this pull request?
Adding a
LogicalWriteInfo
interface as suggested by @cloud-fan in #25990 (comment)Why are the changes needed?
It provides compile-time guarantees where we previously had none, which will make it harder to introduce bugs in the future.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Compiles and passes tests