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 2020/02/21 21:54:43 UTC
[GitHub] [spark] viirya commented on issue #27150: [SPARK-30471][SQL] Fix
issue when comparing String and IntegerType
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:
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