viirya commented on issue #27150: [SPARK-30471][SQL] Fix issue when comparing String and IntegerType URL: https://github.com/apache/spark/pull/27150#issuecomment-589853355 > More importantly, we should only allow the comparison for literal strings like many other SQL systems. The string content is unknown and it's very likely to fail, so only allow string literal can fail earlier at compile time. Yea, as I just tried, PostgreSQL only allows comparison between string literals and numeric. @cloud-fan's ideas looks reasonable to me. Just wondering why we don't also cast to double for case 1? Although it is true PostgreSQL disallows something like `select '2.2' > 1;`.
---------------------------------------------------------------- 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]
