You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/05/06 16:30:25 UTC

[GitHub] [spark] 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

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org