【发布时间】:2021-06-07 06:21:10
【问题描述】:
我创建了一个带有 4 个桶的蜂巢表.. 我可以从第 n 个桶中读取数据..
例如..
Select * from collection tablesample(bucket 1 out of 4 on loan_id)
但是如何从第二和第三桶中检索数据..
【问题讨论】:
我创建了一个带有 4 个桶的蜂巢表.. 我可以从第 n 个桶中读取数据..
例如..
Select * from collection tablesample(bucket 1 out of 4 on loan_id)
但是如何从第二和第三桶中检索数据..
【问题讨论】:
试试 UNION ALL:
Select * from collection tablesample(bucket 2 out of 4 on loan_id)
UNION ALL
Select * from collection tablesample(bucket 3 out of 4 on loan_id)
【讨论】: