You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "itholic (via GitHub)" <gi...@apache.org> on 2024/01/24 06:10:12 UTC

[PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

itholic opened a new pull request, #44864:
URL: https://github.com/apache/spark/pull/44864

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   
   The PR proposes to enable Pandas API on Spark test without optional dependency on PyPy
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   PyPy has no pandas/pyarrow, so we should enable test without them on PyPy.
   
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   No, test-only.
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   The existing CI should pass.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   <!--
   If generative AI tooling has been used in the process of authoring this patch, please include the
   phrase: 'Generated-by: ' followed by the name of the tool and its version.
   If no, write 'No'.
   Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
   -->
   No.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1466050996


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   > Can we explicitly skip the tests if dependnecies are unavailable?
   
   @panbingkun can we just skip all test including `assertDataFrameEqual` in you PR?? Could this be a solution for the current build issue?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1467155696


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   > This fix is related to #44778.
   > 
   > IIRC we once tried to skip PyPy from CI because `numpy`, `pandas`, and `pyarrow` are not available from PyPy, but we decided to only skip problematic doctest instead of skipping whole PyPy (discussed from [#44778 (comment)](https://github.com/apache/spark/pull/44778#discussion_r1457628763)).
   > 
   > So, we un-skip PyPy CI from [9d905aa](https://github.com/apache/spark/commit/9d905aaf0591b4d0f57b2823c613efbf74ef23f5), but `assertDataFrameEqual` function still depend on `pyspark.pandas` which requires `pandas` and `pyarrow` as we can see in this fixed file (`pyspark/pandas/__init__.py`) so [multiple tests keep failing](https://github.com/panbingkun/spark/actions/runs/7634418170/job/20798310295#step:12:4443).
   > 
   > So what I'm trying to do here is that if the current running Python implementation is PyPy, allow running test without `pandas` and `pyarrow` which are unavailable from PyPy.
   > 
   > @panbingkun could you double-check if I understood correctly based on our recent discussion??
   
   At present, this situation is not `doctests`, but traditional testing; We have already skipped the doctests using ` # doctest: +SKIP`
   
   The root cause is that in the above tests, the `assertDataFrameEqual` method was used, which heavily relies on `pyarrow` `pandas`. If our environment does not install the above dependency, we will fail.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1467151368


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   <del> Is this like going back to the plan of adding `@unittest.skipIf(not have_pyarrow, pyarrow_requirement_message)
   ` before the `pyspark.sql.tests.test_udf.UDFTests.test_named_arguments` method? </del>
   
   <del> If that's the case, we can skip the `pyspark.sql.tests.test_udf.UDFTests.test_named_arguments` test. </del>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1467174059


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   > > Can we explicitly skip the tests if dependnecies are unavailable?
   > 
   > @panbingkun can we just skip all test including `assertDataFrameEqual` from your PR?? Could this be a solution for the current build issue?
   
   If we can prevent `assertDataFrameEqual` from executing without installing `pyarrow` or `pandas`, this be a solution for the current build issue.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1467163965


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   eg,
   <img width="674" alt="image" src="https://github.com/apache/spark/assets/15246973/4c74c5e4-7369-4748-8b94-ca576d17ac43">
   If `pyarrow` or `pandas` are not used in `assertDataFrameEqual`, we will let it execute.
   If `pyarrow` or `pandas` are involved in `assertDataFrameEqual` and we have not installed it, we will skip it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1467163965


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   eg,
   <img width="674" alt="image" src="https://github.com/apache/spark/assets/15246973/4c74c5e4-7369-4748-8b94-ca576d17ac43">
   If `pyarrow` or `pandas` are not used in `assertDataFrameEqual`, we will let it execute.
   If `pyarrow` or `pandas` are involved in `assertDataFrameEqual` and we have not installed it, we will skip it.
   
   Based on my understanding:
   The `assertDataFrameEqual` method, during executing, if the data is not used in `pyarrow` or `pandas` and `pyarrow` or `pandas` is not installed in the environment, it will also throw an excertion. We should solve the problem in this situation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1464609565


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   Can we explicitly skip the tests if dependnecies are unavailable?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1464499226


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   This fix is related to https://github.com/apache/spark/pull/44778.
   
   IIRC we once tried to skip PyPy from CI because `numpy`, `pandas`, and `pyarrow` are not available from PyPy, but we decided to only skip problematic doctest instead of skipping whole PyPy (discussed from https://github.com/apache/spark/pull/44778#discussion_r1457628763).
   
   So, we un-skip PyPy CI from https://github.com/apache/spark/commit/9d905aaf0591b4d0f57b2823c613efbf74ef23f5, but `assertDataFrameEqual` function still depend on `pyspark.pandas` which requires `pandas` and `pyarrow` as we can see in this fixed file (`pyspark/pandas/__init__.py`) so [multiple tests keep failing](https://github.com/panbingkun/spark/actions/runs/7634418170/job/20798310295#step:12:4443).
   
   So what I'm trying to do here is that if the current running Python implementation is PyPy, allow running test without `pandas` and `pyarrow` which are unavailable from PyPy.
   
   @panbingkun could you double-check if I understood correctly based on our recent discussion??



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic closed pull request #44864: [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy
URL: https://github.com/apache/spark/pull/44864


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1467177839


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   Similar to this?
   
   <img width="762" alt="image" src="https://github.com/apache/spark/assets/15246973/bae33b9e-9781-4d9f-bbec-18b32a2b794c">
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1464362619


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   why pypy?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1464499226


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   This fix is related to https://github.com/apache/spark/pull/44778.
   
   IIRC we once tried to skip PyPy from CI because `numpy`, `pandas`, and `pyarrow` are not available from PyPy, but we decided to only skip problematic doctest instead of skipping whole PyPy (discussed from https://github.com/apache/spark/pull/44778#discussion_r1457628763).
   
   So, we un-skip PyPy CI from https://github.com/apache/spark/commit/9d905aaf0591b4d0f57b2823c613efbf74ef23f5, but `assertDataFrameEqual` function still depend on `pyspark.pandas` which requires `pandas` and `pyarrow` as we can see in this fixed file (`pyspark/pandas/__init__.py`) so the [test keep failing](https://github.com/panbingkun/spark/actions/runs/7634418170/job/20798310295#step:12:4443).
   
   So what I'm trying to do here is that if the current running Python implementation is PyPy, allow running test without `pandas` and `pyarrow` which are unavailable from PyPy.
   
   @panbingkun could you double-check if I understood correctly based on our recent discussion??



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1467241050


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   > Similar to this?
   
   I think this is the current best way because we can't remove `import pyspark.pandas` from `assertDataFrameEqual`. Let's go with this way and let me just close this PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1467246892


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   Okay, I'll give it a try.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1466050996


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   > Can we explicitly skip the tests if dependnecies are unavailable?
   
   @panbingkun can we just skip all test including `assertDataFrameEqual` from your PR?? Could this be a solution for the current build issue?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1464499226


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   This fix is related to https://github.com/apache/spark/pull/44778.
   
   IIRC we once tried to skip PyPy from CI because `numpy`, `pandas`, and `pyarrow` are not available PyPy, but we decided to only skip problematic doctest instead of skipping whole PyPy (discussed from https://github.com/apache/spark/pull/44778#discussion_r1457628763).
   
   So, we un-skip PyPy CI from https://github.com/apache/spark/commit/9d905aaf0591b4d0f57b2823c613efbf74ef23f5, but `assertDataFrameEqual` function still depend on `pyspark.pandas` which requires `pandas` and `pyarrow` as we can see in this fixed file (`pyspark/pandas/__init__.py`) so the [test keep failing](https://github.com/panbingkun/spark/actions/runs/7634418170/job/20798310295#step:12:4443).
   
   So what I'm trying to do here is that if the current running Python implementation is PyPy, allow running test without `pandas` and `pyarrow` which are unavailable from PyPy.
   
   @panbingkun could you double-check if I understood correctly based on our recent discussion??



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1464364586


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   I didn't fully understand this. which test is problem?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1467151368


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   Is this like going back to the plan of adding `@unittest.skipIf(not have_pyarrow, pyarrow_requirement_message)
   ` before the `pyspark.sql.tests.test_udf.UDFTests.test_named_arguments` method?
   
   If that's the case, we can skip the `pyspark.sql.tests.test_udf.UDFTests.test_named_arguments` test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-46824][PS][BUILD] Enable Pandas-on-Spark test without optional dependency on PyPy [spark]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #44864:
URL: https://github.com/apache/spark/pull/44864#discussion_r1467151368


##########
python/pyspark/pandas/__init__.py:
##########
@@ -35,7 +35,9 @@
 except ImportError as e:
     if os.environ.get("SPARK_TESTING"):
         warnings.warn(str(e))
-        sys.exit()
+        # Run test without pandas/pyarrow on PyPy

Review Comment:
   Is this like going back to the plan of adding `` before the `pyspark.sql.tests.test_udf.UDFTests.test_named_arguments` method?
   
   If that's the case, we can skip the `pyspark.sql.tests.test_udf.UDFTests.test_named_arguments` test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org