Skip to content

Conversation

@HyukjinKwon
Copy link
Member

What changes were proposed in this pull request?

This PR adds three API below to Spark Connect

  • Catalog.isCached
  • Catalog.cacheTable
  • Catalog uncacheTable

Why are the changes needed?

These were not added because of the design concern (in its behaviour). However, we should provide the same API compatibility and behaivours with the regular PySpark in any event. So these are proposed back.

Does this PR introduce any user-facing change?

No to end users.
Yes to the dev because it adds three new API in Spark Connect.

How was this patch tested?

Unittests were added.

@HyukjinKwon
Copy link
Member Author

cc @zhengruifeng, @grundprinzip @ueshin FYI

@HyukjinKwon HyukjinKwon force-pushed the SPARK-41600-SPARK-41623-SPARK-41612 branch from be8f9c9 to d9de8a0 Compare February 7, 2023 03:41
@HyukjinKwon HyukjinKwon marked this pull request as ready for review February 7, 2023 03:41
@HyukjinKwon HyukjinKwon force-pushed the SPARK-41600-SPARK-41623-SPARK-41612 branch from d9de8a0 to a9d85f0 Compare February 7, 2023 03:42
Copy link
Member Author

Choose a reason for hiding this comment

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

Should change back once #39882 is merged.

@HyukjinKwon HyukjinKwon force-pushed the SPARK-41600-SPARK-41623-SPARK-41612 branch from a9d85f0 to 7f1f45c Compare February 7, 2023 03:43
@HyukjinKwon HyukjinKwon force-pushed the SPARK-41600-SPARK-41623-SPARK-41612 branch from 7f1f45c to bae11a1 Compare February 7, 2023 03:55
Throw an analysis exception when the table does not exist.
>>> spark.catalog.isCached("not_existing_table")
>>> spark.catalog.isCached("not_existing_table") # doctest: +SKIP
Copy link
Member Author

Choose a reason for hiding this comment

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

Should enable this back too once #39882 is merged.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM (Pending CIs)

@HyukjinKwon
Copy link
Member Author

Merged to master and branch-3.4.

@HyukjinKwon
Copy link
Member Author

Thank you guys.

HyukjinKwon added a commit that referenced this pull request Feb 7, 2023
…cheTable, isCached and uncache

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

This PR adds three API below to Spark Connect
- `Catalog.isCached`
- `Catalog.cacheTable`
- `Catalog uncacheTable`

### Why are the changes needed?

These were not added because of the design concern (in its behaviour). However, we should provide the same API compatibility and behaivours with the regular PySpark in any event. So these are proposed back.

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

No to end users.
Yes to the dev because it adds three new API in Spark Connect.

### How was this patch tested?

Unittests were added.

Closes #39919 from HyukjinKwon/SPARK-41600-SPARK-41623-SPARK-41612.

Authored-by: Hyukjin Kwon <gurwls223@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit 54b5cf6)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
snmvaughan pushed a commit to snmvaughan/spark that referenced this pull request Jun 20, 2023
…cheTable, isCached and uncache

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

This PR adds three API below to Spark Connect
- `Catalog.isCached`
- `Catalog.cacheTable`
- `Catalog uncacheTable`

### Why are the changes needed?

These were not added because of the design concern (in its behaviour). However, we should provide the same API compatibility and behaivours with the regular PySpark in any event. So these are proposed back.

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

No to end users.
Yes to the dev because it adds three new API in Spark Connect.

### How was this patch tested?

Unittests were added.

Closes apache#39919 from HyukjinKwon/SPARK-41600-SPARK-41623-SPARK-41612.

Authored-by: Hyukjin Kwon <gurwls223@apache.org>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit 54b5cf6)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
@HyukjinKwon HyukjinKwon deleted the SPARK-41600-SPARK-41623-SPARK-41612 branch January 15, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants