Hive table replace timestamp column NULL value with Custom default

Viewed 358

I understand how to keep default value as current timestamp, But I have requirement to replace NULL value in timestamp column with custom date/timestamp.

1 Answers

There is coalesce function that you can use, e.g.,

select coalesce(column_name, cast("2020-07-28 12:34:56" as timestamp))
Related