Hive 配置单元查询不允许>;=在where子句中
我有一个配置单元查询,它返回Hive 配置单元查询不允许>;=在where子句中,hive,subquery,hiveql,Hive,Subquery,Hiveql,我有一个配置单元查询,它返回max\u date(单行,单列),用于对主表进行数据过滤。我使用临时表为max\u date create temporary table umt (processdate date); insert into umt ( select code for max_date from a_table where processname = 'a_process' ); 我想在主表查询中使用此最大日期。 如果我使用硬编码日期过滤主表,我会在1-2分钟内得到结果
max\u date
(单行,单列),用于对主表进行数据过滤。我使用临时表为max\u date
create temporary table umt (processdate date);
insert into umt (
select
code for max_date from a_table
where processname = 'a_process'
);
我想在主表查询中使用此最大日期。
如果我使用硬编码日期过滤主表,我会在1-2分钟内得到结果
从主表中选择数据,其中过程日期>='2020-09-01'代码>1-2分钟
然而,如果我加入它需要超过15分钟。主_表在process_date列上进行分区
在进程日期从主表内部连接umt中选择数据>=umt.\u max\u日期代码>~15分钟
是否有任何方法可以提高性能,或者有任何方法可以替换查询中的max_日期以避免加入