排除num列
set hive.support.quoted.identifiers=none;
select
`(num)?+.+`
from
(select
row_number() over (partition by uid order by pay_time asc) as num
,*
from order) first_order
where num = 1;
排除num和uid列
set hive.support.quoted.identifiers=none;
select
`(num|uid)?+.+`
from
(select
row_number() over (partition by uid order by pay_time asc) as num
,*
from order) first_order
where num = 1;
选择所有以price作为前缀的列
set hive.support.quoted.identifiers=none;
select
`price.*`
from stocks;
上面的 set hive.support.quoted.identifiers=none; 可以替换为:
在'hive-site.xml'中添加
hive.support.quoted.identifiers=none
,效果一样