zero323 commented on a change in pull request #29122:
URL: https://github.com/apache/spark/pull/29122#discussion_r458287046



##########
File path: python/pyspark/sql/functions.py
##########
@@ -2392,7 +2393,7 @@ def json_tuple(col, *fields):
 
 
 @since(2.1)
-def from_json(col, schema, options={}):
+def from_json(col, schema, options: Dict = None):

Review comment:
       > Personally, I don't see any harm in adding the types over time, and 
work towards coverage,
   
   The biggest problem is the resolution. As far as I am aware it is 
all-or-nothing at the module level (assuming `partial` mode), so working over 
time will likely degrade experience of the users that already use annotations.
   
   And it seems somewhat unnecessary, considering that you could migrate stubs 
into main repo with a single copy, if there was a will to maintain the result. 
Inline variant would be trickier (and there is still concern of 
https://bugs.python.org/issue39168). 
   
   




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

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