You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/07/21 02:26:08 UTC

[GitHub] [spark] bzhaoopenstack commented on a diff in pull request #37234: [SPARK-39822][PYTHON] Provide a good feedback to users

bzhaoopenstack commented on code in PR #37234:
URL: https://github.com/apache/spark/pull/37234#discussion_r926196508


##########
python/pyspark/pandas/typedef/typehints.py:
##########
@@ -357,7 +359,18 @@ def infer_pd_series_spark_type(
         elif hasattr(pser.iloc[0], "__UDT__"):
             return pser.iloc[0].__UDT__
         else:
-            return from_arrow_type(pa.Array.from_pandas(pser).type, prefer_timestamp_ntz)
+            try:
+                internal_frame = pa.Array.from_pandas(pser)
+            except (pa.lib.ArrowInvalid, pa.lib.ArrowTypeError):
+                raise SparkPandasNotImplementedError(
+                    description="Pyspark doesn't support multiple type in a single index,"

Review Comment:
   OK, Thanks, will refresh.



-- 
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