wangyum commented on PR #41332:
URL: https://github.com/apache/spark/pull/41332#issuecomment-1590349150
> @wangyum Yes. We won't push out a change that will produce incorrect
result.
It seems the result is not correct after this patch:
```
scala> spark.sql("CREATE TABLE t1(id int) PARTITIONED BY (dt string);")
res0: org.apache.spark.sql.DataFrame = []
scala> spark.sql("insert into t1 partition(dt = '2023-1-01') select 1;")
res1: org.apache.spark.sql.DataFrame = []
scala> spark.sql("select * from t1 where dt = date '2023-01-01';").show
+---+---+
| id| dt|
+---+---+
+---+---+
scala> spark.sql("set
spark.sql.optimizer.excludedRules=org.apache.spark.sql.catalyst.optimizer.UnwrapCastInBinaryComparison")
res3: org.apache.spark.sql.DataFrame = [key: string, value: string]
scala> spark.sql("select * from t1 where dt = date '2023-01-01';").show
+---+---------+
| id| dt|
+---+---------+
| 1|2023-1-01|
+---+---------+
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]