dbatomic commented on code in PR #45383:
URL: https://github.com/apache/spark/pull/45383#discussion_r1528926135


##########
python/pyspark/sql/types.py:
##########
@@ -262,8 +262,8 @@ def __init__(self, collationId: int = 0):
     def collationIdToName(self) -> str:
         return (
             " collate %s" % StringType.collationNames[self.collationId]

Review Comment:
   this is kind of unreadable? Maybe go with:
   ```python
   if self.collationId == 0: ""
   elif self.collationId == -1: "INTERMINATE"
   else: StringType.collationNames[self.collationId]
   ```



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

Reply via email to