-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-31321][SQL] Remove SaveMode check in v2 FileWriteBuilder #28090
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
|
Test build #120668 has finished for PR 28090 at commit
|
| private val options = info.options() | ||
| private var mode: SaveMode = _ | ||
|
|
||
| def mode(mode: SaveMode): WriteBuilder = { |
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.
@yaooqinn . Technically, removal of dead code is not a bug fix. Please re-category this as an Improvement.
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.
OK, thanks
|
|
||
| val fs = path.getFileSystem(hadoopConf) | ||
| mode match { | ||
| case SaveMode.ErrorIfExists if fs.exists(path) => |
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.
Could you give me the pointer where handles this?
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.
e.g.
| case (SaveMode.Append, Some(table)) => |
|
cc @cloud-fan |
|
I'm OK to remove dead code, this was probably leftover when we remove |
thanks, referenced the related PR #25876 and updated the PR description |
|
thanks, merging to master/3.0! |
### What changes were proposed in this pull request? The `SaveMode` is resolved before we create `FileWriteBuilder` to build `BatchWrite`. In #25876, we removed save mode for DSV2 from DataFrameWriter. So that the `mode` method is never used which makes `validateInputs` fail determinately without `mode` set. ### Why are the changes needed? rm dead code. ### Does this PR introduce any user-facing change? no ### How was this patch tested? existing tests. Closes #28090 from yaooqinn/SPARK-31321. Authored-by: Kent Yao <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit 1ce584f) Signed-off-by: Wenchen Fan <[email protected]>
|
Thank you, @cloud-fan and @yaooqinn . |
### What changes were proposed in this pull request? The `SaveMode` is resolved before we create `FileWriteBuilder` to build `BatchWrite`. In apache#25876, we removed save mode for DSV2 from DataFrameWriter. So that the `mode` method is never used which makes `validateInputs` fail determinately without `mode` set. ### Why are the changes needed? rm dead code. ### Does this PR introduce any user-facing change? no ### How was this patch tested? existing tests. Closes apache#28090 from yaooqinn/SPARK-31321. Authored-by: Kent Yao <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
The
SaveModeis resolved before we createFileWriteBuilderto buildBatchWrite.In #25876, we removed save mode for DSV2 from DataFrameWriter. So that the
modemethod is never used which makesvalidateInputsfail determinately withoutmodeset.Why are the changes needed?
rm dead code.
Does this PR introduce any user-facing change?
no
How was this patch tested?
existing tests.