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 2021/07/13 18:42:30 UTC
[GitHub] [spark] allisonwang-db commented on pull request #32488: [SPARK-35316][SQL] UnwrapCastInBinaryComparison support In/InSet predicate
allisonwang-db commented on pull request #32488:
URL: https://github.com/apache/spark/pull/32488#issuecomment-879315179
Hi @cfmcgrady this check
https://github.com/apache/spark/blob/fbf53dee37129a493a4e5d5a007625b35f44fbda/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/UnwrapCastInBinaryComparison.scala#L162
can fail with the following case
```sql
CREATE TABLE tbl (d decimal(33, 27)) USING PARQUET
SELECT d FROM tbl WHERE d NOT IN (d + 1)
```
Here `in.list` can be a `CheckOverflow` expression:
```
cast(d#240 as decimal(34,27)) IN (CheckOverflow((promote_precision(cast(d#240 as decimal(34,27))) + 1.000000000000000000000000000), DecimalType(34,27), true))
```
cc @cloud-fan
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org