Skip to content

Conversation

@gengliangwang
Copy link
Member

What changes were proposed in this pull request?

This is a followup PR to resolve comment: #23601 (review)

When Spark writes DataFrame with "overwrite" mode, it deletes the output path before actual writes. To safely handle the case that the output path doesn't exist, it is suggested to follow the V1 code by checking the existence.

How was this patch tested?

Apply #23836 and run unit tests

@gengliangwang
Copy link
Member Author

@gatorsmile @cloud-fan

@SparkQA
Copy link

SparkQA commented Feb 25, 2019

Test build #102756 has finished for PR 23889 at commit 20210b9.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member

Hi, @gengliangwang . The PR looks reasonable, but do we need #23836 for this?

## How was this patch tested?
Apply #23836 and run unit tests

Copy link
Member

@gatorsmile gatorsmile left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks! Merged to master.

@gengliangwang
Copy link
Member Author

Hi, @gengliangwang . The PR looks reasonable, but do we need #23836 for this?

Otherwise, the V2 write path is not tested. I just tested it on my local ENV since the code is so simple.

mccheah pushed a commit to palantir/spark that referenced this pull request May 15, 2019
…t path before delete it

## What changes were proposed in this pull request?
This is a followup PR to resolve comment: apache#23601 (review)

When Spark writes DataFrame with "overwrite" mode, it deletes the output path before actual writes. To safely handle the case that the output path doesn't exist,  it is suggested to follow the V1 code by checking the existence.

## How was this patch tested?

Apply apache#23836 and run unit tests

Closes apache#23889 from gengliangwang/checkFileBeforeOverwrite.

Authored-by: Gengliang Wang <[email protected]>
Signed-off-by: gatorsmile <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants