我在 hive 里有一张table。
所有查询都在配置单元客户端中工作。
但在presto中,我无法使用此表运行任何查询:
Query ... failed: Hive table is corrupt.
It is declared as being bucketed, but the files do not match the
bucketing declaration.
The number of files in the directory (0) does not match the declared
bucket count (8) for partition: <UNPARTITIONED>
之后 set hive.enforce.bucketing = true;
错误:
Query ... failed: Hive table is corrupt.
It is declared as being bucketed, but the files do not match the bucketing declaration.
Found sub-directory in bucket directory for partition: <UNPARTITIONED>
我需要帮助。
1条答案
按热度按时间pb3s4cty1#
set hive.enforce.bucketing = true
确保插入的数据放在正确的存储桶中。似乎是以前插入的数据导致了这种损坏。您应该删除它并重新插入,设置
hive.enforce.bucketing
至true
事先。