尝试使用以下查询提取上次更新时间。
hive抛出异常错误:编译语句时出错:FAILED:ParseException第4:7行无法识别' cast附近的输入((cast(sys_extract_utc(update_time)AS DATE) - TO_DATE(&# 39;'' 01'' - '在表达式规范中(州= 42000,代码= 40000)
select cast(10000 as int),
case data_type
when 'TIMESTAMP' then
concat(' ,cast((cast(sys_extract_utc(update_time) AS DATE) - TO_DATE('01-01-1970 00:00:00', 'DD-MM-YYYY HH24:MI:SS')) * 86400 AS INT) last_date_time_ts')
else
concat(' ,#unknown data_type : ', data_type)
end
from (select row_number() over() ln, table_name, column_name, data_type, column_id
from test.all_tab_columns
where date_key in (select max(date_key) from test.all_tab_columns)
and table_name = 'test_table'
) data