cloud-fan commented on issue #18986: [SPARK-21774][SQL] The rule PromoteStrings 
should cast a string to double type when compare with a int/long
URL: https://github.com/apache/spark/pull/18986#issuecomment-489684542
 
 
   I don't think there is a perfect solution here. When comparing a string and 
a number, you have no idea which type we should cast the string to, without 
looking into the string content.
   
   For this specific case: `select '0.99' > 0`. I think returning null is more 
reasonable, as it's invalid to cast `"0.99"` to int type.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to