forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
21 lines
2.1 KiB
HTML
21 lines
2.1 KiB
HTML
<a name="mrs_01_1761"></a><a name="mrs_01_1761"></a>
|
|
|
|
<h1 class="topictitle1">Error Reported When the WHERE Condition Is Used to Query Tables with Excessive Partitions in FusionInsight Hive</h1>
|
|
<div id="body1595924881702"><div class="section" id="mrs_01_1761__section760819535558"><h4 class="sectiontitle">Question</h4><div class="p" id="mrs_01_1761__p126080534558">When a table with more than 32,000 partitions is created in Hive, an exception occurs during the query with the WHERE partition. In addition, the exception information printed in <span class="filepath" id="mrs_01_1761__filepath185363884419"><b>metastore.log</b></span> contains the following information:<pre class="screen" id="mrs_01_1761__screen1293216521821">Caused by: java.io.IOException: Tried to send an out-of-range integer as a 2-byte value: 32970
|
|
at org.postgresql.core.PGStream.SendInteger2(PGStream.java:199)
|
|
at org.postgresql.core.v3.QueryExecutorImpl.sendParse(QueryExecutorImpl.java:1330)
|
|
at org.postgresql.core.v3.QueryExecutorImpl.sendOneQuery(QueryExecutorImpl.java:1601)
|
|
at org.postgresql.core.v3.QueryExecutorImpl.sendParse(QueryExecutorImpl.java:1191)
|
|
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:346)</pre>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_01_1761__section1560825385516"><h4 class="sectiontitle">Answer</h4><p id="mrs_01_1761__p16609115365518">During a query with partition conditions, HiveServer optimizes the partitions to avoid full table scanning. All partitions whose metadata meets the conditions need to be queried. However, the <strong id="mrs_01_1761__b56357291702">sendOneQuery </strong>interface provided by GaussDB limits the parameter value to <strong id="mrs_01_1761__b14712143316">32767</strong> in the <strong id="mrs_01_1761__b136357294013">sendParse</strong> method. If the number of partition conditions exceeds <strong id="mrs_01_1761__b8734171810">32767</strong>, an exception occurs.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1752.html">Common Issues About Hive</a></div>
|
|
</div>
|
|
</div>
|
|
|