https://www.w3school.com.cn/sql/sql_union.asp
A union B 如果A中的一列和B中的一列完全一样,那就只选取一列
A unionallB 如果A中的一列和B中的一列完全一样,那就选择所有列
table C left join
(select distinct
learn_season,
semester_id,
from dataware.dim_learn_season
where dt = '${hiveconf:date}'
union all
select distinct
learn_season,
learn_season as semester_id,
from dataware.dim_learn_season
where dt = '${hiveconf:date}'
) AS LS
on C.learn_season=LS.semester_id