liukun4515 opened a new issue, #2799:
URL: https://github.com/apache/arrow-datafusion/issues/2799
I have some concerns about the rule between string and number.
I check some situation in the spark:
```
spark-sql> desc t3;
c1 int
spark-sql> explain extended select * from t3 where c1 = cast(123.123 as
string);
== Parsed Logical Plan ==
'Project [*]
+- 'Filter ('c1 = cast(123.123 as string))
+- 'UnresolvedRelation [t3], [], false
== Analyzed Logical Plan ==
c1: int
Project [c1#186]
+- Filter (c1#186 = cast(cast(123.123 as string) as int))
+- SubqueryAlias spark_catalog.default.t3
+- HiveTableRelation [`default`.`t3`,
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, Data Cols: [c1#186],
Partition Cols: []]
== Optimized Logical Plan ==
Filter (isnotnull(c1#186) AND (c1#186 = 123))
+- HiveTableRelation [`default`.`t3`,
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, Data Cols: [c1#186],
Partition Cols: []]
== Physical Plan ==
*(1) Filter (isnotnull(c1#186) AND (c1#186 = 123))
+- Scan hive default.t3 [c1#186], HiveTableRelation [`default`.`t3`,
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, Data Cols: [c1#186],
Partition Cols: []]
```
In the previous case, the result of coercion is `Int`.
I think we need to create an issue to track this.
@viirya @alamb
_Originally posted by @liukun4515 in
https://github.com/apache/arrow-datafusion/pull/2794#discussion_r907011527_
--
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]