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-47191][SQL] Avoid unnecessary relation lookup when uncaching table/view #45289

Closed
wants to merge 1 commit into from

Conversation

cloud-fan
Copy link
Contributor

@cloud-fan cloud-fan commented Feb 27, 2024

What changes were proposed in this pull request?

Some commands like ALTER TABLE and REPLACE VIEW need to uncache the table/view. Today the implementation simply does sparkSession.catalog.uncacheTable(name), which looks up the table/view. This PR improves it by using the existing CacheManager.uncacheTableOrView function, which does not need to look up the table view.

Why are the changes needed?

small perf improvement (reduce metastore RPC calls)

Does this PR introduce any user-facing change?

no

How was this patch tested?

existing tests

Was this patch authored or co-authored using generative AI tooling?

no

@github-actions github-actions bot added the SQL label Feb 27, 2024
@cloud-fan
Copy link
Contributor Author

thanks for the review, merging to master!

@cloud-fan cloud-fan closed this in 6d41866 Feb 28, 2024
TakawaAkirayo pushed a commit to TakawaAkirayo/spark that referenced this pull request Mar 4, 2024
…able/view

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

Some commands like ALTER TABLE and REPLACE VIEW need to uncache the table/view. Today the implementation simply does `sparkSession.catalog.uncacheTable(name)`, which looks up the table/view. This PR improves it by using the existing `CacheManager.uncacheTableOrView` function, which does not need to look up the table view.

### Why are the changes needed?

small perf improvement (reduce metastore RPC calls)

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

no

### How was this patch tested?

existing tests

### Was this patch authored or co-authored using generative AI tooling?

no

Closes apache#45289 from cloud-fan/view.

Authored-by: Wenchen Fan <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
ericm-db pushed a commit to ericm-db/spark that referenced this pull request Mar 5, 2024
…able/view

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

Some commands like ALTER TABLE and REPLACE VIEW need to uncache the table/view. Today the implementation simply does `sparkSession.catalog.uncacheTable(name)`, which looks up the table/view. This PR improves it by using the existing `CacheManager.uncacheTableOrView` function, which does not need to look up the table view.

### Why are the changes needed?

small perf improvement (reduce metastore RPC calls)

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

no

### How was this patch tested?

existing tests

### Was this patch authored or co-authored using generative AI tooling?

no

Closes apache#45289 from cloud-fan/view.

Authored-by: Wenchen Fan <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
mythrocks added a commit to mythrocks/spark-rapids that referenced this pull request May 22, 2024
Fixes NVIDIA#10710.

This commit accounts for the changes in the signature of `CommandUtils.uncacheTableOrView`
in Apache Spark 4.0. (See [SPARK-47191](apache/spark#45289).)

Signed-off-by: MithunR <[email protected]>
razajafri pushed a commit to NVIDIA/spark-rapids that referenced this pull request May 30, 2024
…hange. (#10863)

* Account for `CommandUtils.uncacheTableOrView` signature change.

Fixes #10710.

This commit accounts for the changes in the signature of `CommandUtils.uncacheTableOrView`
in Apache Spark 4.0. (See [SPARK-47191](apache/spark#45289).)

Signed-off-by: MithunR <[email protected]>

* Removed unnecessary base class.

---------

Signed-off-by: MithunR <[email protected]>
SurajAralihalli pushed a commit to SurajAralihalli/spark-rapids that referenced this pull request Jul 12, 2024
…hange. (NVIDIA#10863)

* Account for `CommandUtils.uncacheTableOrView` signature change.

Fixes NVIDIA#10710.

This commit accounts for the changes in the signature of `CommandUtils.uncacheTableOrView`
in Apache Spark 4.0. (See [SPARK-47191](apache/spark#45289).)

Signed-off-by: MithunR <[email protected]>

* Removed unnecessary base class.

---------

Signed-off-by: MithunR <[email protected]>
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