hive on spark后执行group by等查询时中文出现乱码问题

出现这种问题可能是varchar类型数据导致的。不group by的时候不会遇到。解决方法类似如下写法:
with temp as(
select
cast(primary_channel as string) primary_channel,
cast(channel_keywords as string) channel_keywords,
cast(channel_code as string) channel_code,
cast(channel_name as string) channel_name
from ddi.dim_fill_strategic_channel_level_attribution_df_test
)
select
primary_channel,
channel_keywords,
channel_code,
channel_name
from temp
group by
primary_channel,
channel_keywords,
channel_code,
channel_name

上一篇:MySql 创建多字段主键


下一篇:javascript 创建对象——类,继承