<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question invalid type length for Decimal fields when Impala query on Parquet stored Hive Table in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/invalid-type-length-for-Decimal-fields-when-Impala-query-on/m-p/289325#M214176</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am trying to custom parquet-avro schema creation for a table which is taken from Kafka Topic using Java Avro API. Output parquet file is worn with Hive table table. Decimal fields are created as&amp;nbsp;fixed_len_byte_array on the schema.&amp;nbsp; The Hive table can be queried using Hive and Spark. But, when impala query is used, it gives like below error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/98fa979e37b9a94a9cd4aa1048df03a29a641f19/68747470733a2f2f6973737565732e6170616368652e6f72672f6a6972612f7365637572652f6174746163686d656e742f31323939323835342f31323939323835345f696d6167652d323032302d30322d30372d31312d33312d34332d3634312e706e67" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I try to define byte array size according to cloudera impala documentation&lt;/P&gt;
&lt;P&gt;1 &amp;lt;= precision &amp;lt;=9, then 4 bytes&lt;/P&gt;
&lt;P&gt;10&amp;lt;= precision &amp;lt;=18, then 8 bytes&lt;/P&gt;
&lt;P&gt;precision&amp;gt;18, then 16 bytes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the impala query screen on Cloudera Hue. It shows Hive table description.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/54960b86cc140d0a6f95323685a92c58a01ef479/68747470733a2f2f6973737565732e6170616368652e6f72672f6a6972612f7365637572652f6174746163686d656e742f31323939323835352f31323939323835355f696d6167652d323032302d30322d30372d31312d33332d32372d3934342e706e67" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture20200207.JPG" style="width: 767px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/26293iDCF112AAD93C94F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture20200207.JPG" alt="Capture20200207.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am using array size detection for&amp;nbsp;fixed_len_byte_array like below (accrording to &lt;A href="https://issues.apache.org/jira/browse/IMPALA-2515" target="_blank" rel="noopener"&gt;https://issues.apache.org/jira/browse/IMPALA-2515&lt;/A&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;IMG src="https://ip1.i.lithium.com/540c570f15788732b9130c90aa452965b6360b6c/68747470733a2f2f6973737565732e6170616368652e6f72672f6a6972612f7365637572652f6174746163686d656e742f31323939323835372f31323939323835375f696d6167652d323032302d30322d30372d31312d33362d33312d3435382e706e67" border="0" /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But it gives above error. What is the formula for catching expected array size for Impala?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Feb 2020 13:37:27 GMT</pubDate>
    <dc:creator>Onur</dc:creator>
    <dc:date>2020-02-07T13:37:27Z</dc:date>
  </channel>
</rss>

