查询语句,在Hive版本3.1.0中执行报错,在Hive版本3.1.2中执行成功

第3条语句执行查询,在Hive版本3.1.0中执行报错:Error: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask (state=08S01,code=2),在Hive版本3.1.2中执行成功。

  1. 新建表
CREATE TABLE user_test(
    create_time timestamp,
    user_id string,
    weight int
) STORED AS PARQUET;
  1. 插入语句
insert into user_test values("2023-10-31 22:59:55.0", "john", 80);
  1. 查询(select部分有percentile_approx,同时where部分有unix_timestamp
select percentile_approx(weight, array(0.01, 0.25, 0.5, 0.75, 0.99), 100)
from user_test
where unix_timestamp(create_time) > 0;

posted on 2024-04-02 17:53  cag2050  阅读(19)  评论(0编辑  收藏  举报

导航