https://trysql.io/wlhkZ_velGY2
SELECT
TIMESTAMP '1970-01-01 00:00:00 UTC' = TIMESTAMP '1970-01-01 01:00:00 Europe/Warsaw' AS they_equal,
CASE TIMESTAMP '1970-01-01 00:00:00 UTC'
WHEN IF(rand() < 42, current_date, null) THEN 'impossible'
WHEN TIMESTAMP '1970-01-01 01:00:00 Europe/Warsaw' THEN 'match'
ELSE 'no match'
END
FROM tpch.tiny.region;
| they_equalboolean |
_col1varchar(10) |
| true |
no match |
this is also reproducible for other types where value equality is not binary-equality
- Double 0 and -0 values
- composite values backed by Block (ROW, MAP, ARRAY), where Objects.equals is reference equality
https://trysql.io/wlhkZ_velGY2
this is also reproducible for other types where value equality is not binary-equality