liukun4515 commented on issue #2759:
URL: 
https://github.com/apache/arrow-datafusion/issues/2759#issuecomment-1163865423

   In the spark, we can't compare decimal with boolean, but can compare decimal 
with Null.
   ```
   spark-sql> DESC T1;
   c1                      decimal(10,3)
   
   spark-sql>  select * from t1 where c1 in(NULL);
   Time taken: 0.082 seconds
   ```
   ```
   spark-sql>  select * from t1 where c1 in(CAST(NULL AS BOOLEAN));
   Error in query: cannot resolve '(spark_catalog.default.t1.c1 IN (CAST(NULL 
AS BOOLEAN)))' due to data type mismatch: Arguments must be same type but were: 
decimal(10,3) != boolean; line 1 pos 27;
   'Project [*]
   +- 'Filter c1#656 IN (cast(null as boolean))
      +- SubqueryAlias spark_catalog.default.t1
         +- HiveTableRelation [`default`.`t1`, 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, Data Cols: [c1#656], 
Partition Cols: []]
   
   ```


-- 
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]

Reply via email to