itholic commented on code in PR #40926:
URL: https://github.com/apache/spark/pull/40926#discussion_r1178001954
##########
python/pyspark/sql/types.py:
##########
@@ -2183,7 +2216,13 @@ def asDict(self, recursive: bool = False) -> Dict[str,
Any]:
True
"""
if not hasattr(self, "__fields__"):
- raise TypeError("Cannot convert a Row class into dict")
+ raise PySparkTypeError(
+ error_class="CANNOT_CONVERT",
+ message_parameters={
+ "from_type": "Row",
Review Comment:
IMHO, I think the `Row` itself indicates a class of `Row`, so I just use
this.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]