使用hiveContext.sql执行以下脚本:
123
我得到了这个结果。
with nt as (
select label, score from (
select * from (select label, score, row_number() over (order by score desc) as position from t1)t_1
join
(select count(*) as countall from t1)t_2
)ta
where position <= countall * 0.4
)
screenshot of this sql execution
在rdd和数据框上调用'count()'函数时很奇怪,
如图所示:这里的输出不同。...
有人可以帮我吗?非常感谢!!!