uros-b commented on code in PR #58418:
URL: https://github.com/apache/spark/pull/58418#discussion_r3924737801


##########
python/pyspark/sql/classic/dataframe.py:
##########
@@ -506,13 +507,28 @@ def _converter(parameter: Union[str, list, float, int, 
Column]) -> Any:
     def count(self) -> int:
         return int(self._jdf.count())
 
+    def _check_timestamp_nanos_map_key(self) -> None:

Review Comment:
   The Python-side `TIMESTAMP_NANOS_PYTHON_MAP_KEY` fills `{"type": 
self.schema.simpleString()}` (the whole DataFrame schema) while the message 
reads "Cannot convert a map with `<type>` keys...", so it renders e.g. "a map 
with struct<m:map<timestamp_ntz(9),int>> keys"; the JVM twin 
(`EvaluatePython.toJava`) passes just `mt.keyType.sql`. Pass the offending key 
type (or reword) for an accurate, consistent message.



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