蜂巢: - 在截断表格上,在分区列上选择结果
我在蜂巢中有一张桌子,该表在列上分区。 我截断了桌子,然后在上面做2个选择。
- 从表中选择计数(*),我将结果称为0。这是预期的。
但是,如果我在分区列上进行选择,我会得到结果,而不是我期望的空行。
Select distinct <paritition column>
from table
结果:
partition value 1
partition value 2
......
我可以在HDF中看到分区文件夹仍然存在,尽管它们是空的。我希望元数据在截断后会更新。
我不确定为什么我会得到上述结果,
感谢任何帮助
!
I have a table in hive which is partitioned on a column.
I truncate the table and I do 2 selects on them.
- Select count(*) from table, I get the result as 0. Which is expected.
But If I do a select on the partition column, I get results instead of null rows which I expected.
Select distinct <paritition column>
from table
Result:
partition value 1
partition value 2
......
I can see in hdfs that the partition folders still exists , though they are empty. I expected the metadata to get updated after I did the truncate.
I am not sure why I am getting the above result
Any help is appreciated
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论