我已尝试在Hive中运行以下查询,但它显示以下错误: “JOIN'ff_start_dt'中遇到了左右别名。”我认为下面的hive查询中的ON子句存在问题。 我试过在Teradata上运行相同的查询,它运行得很好。 所以我的问题是:
我们可以在蜂巢中的'ON'子句中使用什么样的alzebraic表达式? 如何在hive中运行以下查询?
SELECT
q.calendar_dt as calendar_dt ,
x.corp_id as corp_id ,
x.mkt_cd as mkt_cd ,
x.bill_curr_cd as bill_curr_cd
FROM
corpmis_daily_time_dim as q
INNER JOIN corpmis_daily_global_corp_daily_expsr as x
INNER JOIN (select max(eff_start_dt) as max_eff_start_dt from corpmis_daily_global_corp_daily_expsr) as y
ON
q.calendar_dt between x.eff_start_dt and x.eff_end_dt WHERE
q.calendar_dt <= y.max_eff_start_dt;