Skip to content

[SPARK-39952][SQL] SaveIntoDataSourceCommand should recache result relation#37380

Closed
ulysses-you wants to merge 1 commit intoapache:masterfrom
ulysses-you:refresh
Closed

[SPARK-39952][SQL] SaveIntoDataSourceCommand should recache result relation#37380
ulysses-you wants to merge 1 commit intoapache:masterfrom
ulysses-you:refresh

Conversation

@ulysses-you
Copy link
Contributor

What changes were proposed in this pull request?

recacheByPlan the result relation inside SaveIntoDataSourceCommand

Why are the changes needed?

The behavior of SaveIntoDataSourceCommand is similar with InsertIntoDataSourceCommand which supports append or overwirte data. In order to keep data consistent, we should always do recacheByPlan the relation on post hoc.

Does this PR introduce any user-facing change?

yes, bug fix

How was this patch tested?

add test

@github-actions github-actions bot added the SQL label Aug 2, 2022
@ulysses-you
Copy link
Contributor Author

cc @cloud-fan

Copy link
Contributor

@cloud-fan cloud-fan left a comment

Choose a reason for hiding this comment

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

LGTM if tests pass

@ulysses-you
Copy link
Contributor Author

the failed R test is irrelevant

@cloud-fan cloud-fan closed this in 5fe0b24 Aug 3, 2022
cloud-fan pushed a commit that referenced this pull request Aug 3, 2022
…lation

### What changes were proposed in this pull request?

recacheByPlan the result relation inside `SaveIntoDataSourceCommand`

### Why are the changes needed?

The behavior of `SaveIntoDataSourceCommand` is similar with `InsertIntoDataSourceCommand` which supports append or overwirte data. In order to keep data consistent,  we should always do recacheByPlan the relation on post hoc.

### Does this PR introduce _any_ user-facing change?

yes, bug fix

### How was this patch tested?

add test

Closes #37380 from ulysses-you/refresh.

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 5fe0b24)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
cloud-fan pushed a commit that referenced this pull request Aug 3, 2022
…lation

### What changes were proposed in this pull request?

recacheByPlan the result relation inside `SaveIntoDataSourceCommand`

### Why are the changes needed?

The behavior of `SaveIntoDataSourceCommand` is similar with `InsertIntoDataSourceCommand` which supports append or overwirte data. In order to keep data consistent,  we should always do recacheByPlan the relation on post hoc.

### Does this PR introduce _any_ user-facing change?

yes, bug fix

### How was this patch tested?

add test

Closes #37380 from ulysses-you/refresh.

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 5fe0b24)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
@cloud-fan
Copy link
Contributor

thanks, merging to master/3.3/3.2/3.1!

cloud-fan pushed a commit that referenced this pull request Aug 3, 2022
…lation

### What changes were proposed in this pull request?

recacheByPlan the result relation inside `SaveIntoDataSourceCommand`

### Why are the changes needed?

The behavior of `SaveIntoDataSourceCommand` is similar with `InsertIntoDataSourceCommand` which supports append or overwirte data. In order to keep data consistent,  we should always do recacheByPlan the relation on post hoc.

### Does this PR introduce _any_ user-facing change?

yes, bug fix

### How was this patch tested?

add test

Closes #37380 from ulysses-you/refresh.

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 5fe0b24)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
@ulysses-you ulysses-you deleted the refresh branch August 4, 2022 00:32
sunchao pushed a commit to sunchao/spark that referenced this pull request Jun 2, 2023
…lation

### What changes were proposed in this pull request?

recacheByPlan the result relation inside `SaveIntoDataSourceCommand`

### Why are the changes needed?

The behavior of `SaveIntoDataSourceCommand` is similar with `InsertIntoDataSourceCommand` which supports append or overwirte data. In order to keep data consistent,  we should always do recacheByPlan the relation on post hoc.

### Does this PR introduce _any_ user-facing change?

yes, bug fix

### How was this patch tested?

add test

Closes apache#37380 from ulysses-you/refresh.

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 5fe0b24)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 7d9cbf5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants