如何在不使用(set hive.mapred.mode=unstrict)的情况下修复分区 predicate 错误

aor9mmx1  于 2021-05-29  发布在  Hadoop
关注(0)|答案(0)|浏览(162)

在分区表中启用严格模式而不使用 set hive.mapred.mode=unstrict 我有两个表都是用dte分区的,当我对这两个表执行并集操作并试图选择2时,我得到的条件是分区 predicate 错误
查询

with a as (select "table1" as table_name,column1,column2,column3 from table_one
union all
select "table2" as table_name,column1,column2,column3 from table_two)
select * from a where dte='2017-08-01' and table_name='table1';

错误
错误:编译语句时出错:失败:semanticexception[error 10041]:找不到别名“table\u one”表“table\u one”的分区 predicate (state=42000,code=10041)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题