You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "xinrong-meng (via GitHub)" <gi...@apache.org> on 2023/12/21 01:40:05 UTC

Re: [PR] [WIP][SPARK-46467][PS][TESTS] Improve and test exceptions of TimedeltaIndex [spark]

xinrong-meng commented on code in PR #44430:
URL: https://github.com/apache/spark/pull/44430#discussion_r1433348531


##########
python/pyspark/pandas/indexes/timedelta.py:
##########
@@ -108,7 +109,7 @@ def __new__(
                 FutureWarning,
             )
         if not is_hashable(name):
-            raise TypeError("Index.name must be a hashable type")
+            raise PySparkTypeError(message="Index.name must be a hashable type")

Review Comment:
   @HyukjinKwon @itholic Adding `message` only will reserve consistency with native Pandas, but might not be consistent with pyspark.sql, which has error_class and error_parameter. WDYT?



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