I am in GMT +0800. When I use hive to process column of timestamp, if this column is in a struct type column, there will be the following.
hive> desc ts;
t timestamp
s struct<t_struct:timestamp>
hive> select * from ts;
1970-01-01 08:00:00 {"t_struct":"1970-01-01 00:00:00"}
and I insert a new line:
hive> insert into ts select * from ts;
show the table data again:
hive> select * from ts;
1970-01-01 08:00:00 {"t_struct":"1969-12-31 16:00:00"}
1970-01-01 08:00:00 {"t_struct":"1970-01-01 00:00:00"}
The colunm tstruct
is wrong.
What should I do to solve this problem?
ps:When I use spark SQL to connect hive not find the mistake. But with MR or Tez find the mistake.
thinks.