你可以先用hive或者手写map/reduce程序。建议你直接使用hive,hive也像mysql一样可以建表。表里的数据就是对应从本地load到hadoop上的文件,格式自己定。然后用JDBC可以像操作mysql一样操作hive(sql语法稍有不同)
搜索了一下hive没有实现递归,那么你引用的帖子里的sql那就没法用了。
so,
这个问题可以用自表关联的方法来解决。
多说无益,如下
sql:
select * from (
select b.id,b.name,max(a.score)score from table_a a
join table_a b
where b.id > a.id
and b.score is null
and a.score is not null
group by b.id,b.name
union all
select * from table_a a where score is not null )tt
order by id asc
热门文章更多>>
标签更多>>
专题更多>>
最新文章更多>>
- iOS 14/iPadOS 14开发者预览版Beta8升级方法及更新内容
- 质因数分解板子
- 简介iOS开发中应用SQLite的模糊查询和常用函数
- 约瑟夫优化
- iOS/iPadOS 14.2Beta 1怎么升级?iOS/iPadOS 14.2开发者预览版Beta 1升级方法
- iOS13.7还能降级吗 iOS13.6.1已关闭验证
- iOS14提醒事项App有哪些改动 iOS14提醒事项功能介绍
- iOS14如何修改小组件 小组件添加和删除方法
- 苹果 iOS 14 Beta 7怎么样 苹果iOS14开发者预览版Beta7更新内容
- iOS/iPadOS 14 Beta 7值得升级吗?iOS/iPadOS 14 Beta 7更新介绍