Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2025 10:41 PM
The following statement gives different outputs in different computes.
In Databricks, 15.4 LTS
%sql
SELECT typeof(coalesce(5, '6'));
-- Output
string
In Serverless, environment version 4
%sql
SELECT typeof(coalesce(5, '6'));
-- Output
bigint
There are other cases as well.
%sql
SELECT '1.00' = 1;
-- Databricks, 15.4 LTS
true
-- Serverless, version 4
[CAST_INVALID_INPUT] The value '1.00' of the type "STRING" cannot be cast to "BIGINT" because it is malformed. Correct the value as per the syntax, or change its target type. Use `try_cast` to tolerate malformed input and return NULL instead. SQLSTATE: 22018 == SQL (line 1, position 😎 == SELECT '1.00' = 1