Skip to content
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-26673][FollowUp][SQL]File Source V2: check existence of output path before delete it #23889

Closed

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 <gengliang.wang@databricks.com>
Signed-off-by: gatorsmile <gatorsmile@gmail.com>
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