Description
select from_unixtime(unix_timestamp('202202', 'yyyyMM'), 'yyyyMMdd');
returns 20220201 in HDI3.6(Hive1.2.1)
returns NULL in HDI4.0(Hive3.1.0)
Turns out Hive 1.2.1 has default value for year(1970), month(01), day(01).
And Hive 3.1.0 doesn't.
So in Hive 3.1.0 we have to parse a date with all 3 parts(y/m/d), otherwise it'll fail.