cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

[DATATYPE_MISMATCH.DATA_DIFF_TYPES] Cannot resolve "coalesce(VALUE, false)"

AmineDE
New Contributor

Hi All,

i got the error below using a compute instance with any of the runtime but not with sql warehouse xsmall. How could we explain it ?

Runtime Error in model sics_business_recon_unpivoted (models\Engineering\Business\sics_business_recon_unpivoted.sql)
[DATATYPE_MISMATCH.DATA_DIFF_TYPES] Cannot resolve "coalesce(VALUE, false)" due to data type mismatch: Input to `coalesce` should all be the same type, but it's ("STRING" or "BOOLEAN"). SQLSTATE: 09; line 1346 pos 21

2 REPLIES 2

SparkJun
Databricks Employee
Databricks Employee

can you try to run this on DBSQL and see if that errors out: coalesce(CAST(VALUE AS BOOLEAN), false)? 
What's the DBR version for your cluster? 

  • on db sql coalesce(CAST(VALUE AS BOOLEAN), false) is working without errors
  • DBR tested are 13.3 to 16, for any of them it is not working.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group