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-35811][PYTHON] Deprecate DataFrame.to_spark_io #32964

Closed
wants to merge 4 commits into from

Conversation

pingsutw
Copy link
Member

What changes were proposed in this pull request?

Deprecate the DataFrame.to_spark_io

Why are the changes needed?

We should deprecate the DataFrame.to_spark_io since it's duplicated with DataFrame.spark.to_spark_io, and it's not existed in pandas.

Does this PR introduce any user-facing change?

Yes, users will get warning while using DataFrame.to_spark_io api.

How was this patch tested?

Pass the CIs

See :meth:`pyspark.pandas.DataFrame.spark.to_spark_io`.

.. deprecated:: 3.2.0
Use :func:`spark.to_spark_io` instead.
Copy link
Member

Choose a reason for hiding this comment

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

Does this link correctly in the built documentation? I thought it has to be :func:DataFrame.spark.to_spark_io

Copy link
Member Author

Choose a reason for hiding this comment

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

@HyukjinKwon Thanks for the review. Updated it.

@HyukjinKwon
Copy link
Member

ok to test

@SparkQA
Copy link

SparkQA commented Jun 19, 2021

Test build #140007 has finished for PR 32964 at commit 6d3d9ef.

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

@SparkQA
Copy link

SparkQA commented Jun 19, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44533/

@SparkQA
Copy link

SparkQA commented Jun 19, 2021

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44533/

@SparkQA
Copy link

SparkQA commented Jun 19, 2021

Test build #140015 has finished for PR 32964 at commit 03e4342.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 19, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44541/

@SparkQA
Copy link

SparkQA commented Jun 19, 2021

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44541/

See :meth:`pyspark.pandas.DataFrame.spark.to_spark_io`.

.. deprecated:: 3.2.0
Use :func:`DataFrame.spark.to_spark_io` instead.
Copy link
Member

Choose a reason for hiding this comment

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

What's diff here? :meth:`pyspark.pandas.DataFrame.spark.to_spark_io` vs :func:`DataFrame.spark.to_spark_io`?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated to pyspark.pandas.spark.accessors.SparkFrameMethods.to_spark_io. Please correct me if I'm wrong.

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

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

Looks good otherwise

@SparkQA
Copy link

SparkQA commented Jun 20, 2021

Test build #140036 has finished for PR 32964 at commit 7b6cda6.

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

@SparkQA
Copy link

SparkQA commented Jun 20, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44563/

@SparkQA
Copy link

SparkQA commented Jun 20, 2021

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44563/

@HyukjinKwon
Copy link
Member

Merged to master.

Thanks @pingsutw

.. deprecated:: 3.2.0
Use :func:`DataFrame.spark.to_spark_io` instead.
"""
warnings.warn("Deprecated in 3.2, Use spark.to_spark_io instead.", FutureWarning)
Copy link
Contributor

@cloud-fan cloud-fan Aug 2, 2021

Choose a reason for hiding this comment

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

shall we use DataFrame.spark.to_spark_io ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good! I'll address it, thanks :)

HyukjinKwon pushed a commit that referenced this pull request Aug 4, 2021
### What changes were proposed in this pull request?

This PR is followup for #32964, to improve the warning message.

### Why are the changes needed?

To improve the warning message.

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

The warning is changed from "Deprecated in 3.2, Use `spark.to_spark_io` instead." to "Deprecated in 3.2, Use `DataFrame.spark.to_spark_io` instead."

### How was this patch tested?

Manually run `dev/lint-python`

Closes #33631 from itholic/SPARK-35811-followup.

Authored-by: itholic <haejoon.lee@databricks.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
HyukjinKwon pushed a commit that referenced this pull request Aug 4, 2021
### What changes were proposed in this pull request?

This PR is followup for #32964, to improve the warning message.

### Why are the changes needed?

To improve the warning message.

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

The warning is changed from "Deprecated in 3.2, Use `spark.to_spark_io` instead." to "Deprecated in 3.2, Use `DataFrame.spark.to_spark_io` instead."

### How was this patch tested?

Manually run `dev/lint-python`

Closes #33631 from itholic/SPARK-35811-followup.

Authored-by: itholic <haejoon.lee@databricks.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit 3d72c20)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants