zhengruifeng commented on code in PR #46738:
URL: https://github.com/apache/spark/pull/46738#discussion_r1613379691
##########
python/pyspark/sql/types.py:
##########
@@ -120,9 +120,8 @@ def __eq__(self, other: Any) -> bool:
def __ne__(self, other: Any) -> bool:
return not self.__eq__(other)
- @classmethod
- def typeName(cls) -> str:
- return cls.__name__[:-4].lower()
+ def typeName(self) -> str:
+ return
self.__class__.__name__.removesuffix("Type").removesuffix("UDT").lower()
Review Comment:
follow Scala side
https://github.com/apache/spark/blob/6f6b4860268dc250d8e31a251d740733798aa512/sql/api/src/main/scala/org/apache/spark/sql/types/DataType.scala#L58-L62
--
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]