COALESCE with Hive SQL September 26, 2023 by Tarik Hive supports bigint literal since 0.8 version. So, additional “L” is enough: COALESCE(column, 0L)