zero323 commented on pull request #33428:
URL: https://github.com/apache/spark/pull/33428#issuecomment-884843089


   I'd like to wait and see if other folks are interested in giving some 
feedback.  
   
   On top of the concerns raised above, there is also a matter of ambiguity 
introduced by application of `Any`.  In particular, we want users to avoid 
creating `Rows` with fields that cannot be referenced:
   
   ```python
   >>> a42 = Row("a", 42)
   >>> a42instance = a42("foo", "bar")
   
   >>> a42instance[42]
   Traceback (most recent call last):
   ...
   IndexError: tuple index out of range
   
   >>> a42instance["42"]
   Traceback (most recent call last):
   ...
   ValueError: 42
   ```
   
   Personally, I believe that it's better to have useful annotations which 
cover majority of known use cases, rather than too broad annotations that cover 
edge scenarios, but make annotations useless for majority of users. 
   
   


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