<?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 IMPALA: scale that does not match the table metadata scale. File metadata scale: 2 Table metadata scale: 6\n in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/IMPALA-scale-that-does-not-match-the-table-metadata-scale/m-p/277332#M207521</link>
    <description>&lt;P&gt;1.We have hive table with below schema.&lt;/P&gt;
&lt;P&gt;create external table precision_1&lt;BR /&gt;(&lt;BR /&gt;id String,&lt;BR /&gt;prec decimal(7,2)&lt;BR /&gt;)&lt;BR /&gt;partitioned by (date string)&lt;BR /&gt;stored as parquet;&lt;/P&gt;
&lt;P&gt;2.insert into precision_1 partition(date='2019-02-01')&amp;nbsp; values ('1', 2.34);&lt;/P&gt;
&lt;P&gt;3.insert into precision_1 partition(date='2019-02-01')&amp;nbsp; values ('2', 3.45);&lt;/P&gt;
&lt;P&gt;3. 'SELECT * from precision_1' works in both impala and Hive&lt;/P&gt;
&lt;P&gt;4.We did following in Hive and invalidated metadata in impala:&lt;/P&gt;
&lt;P&gt;ALTER TABLE precision_1 CHANGE prec prec decimal(9,6);&lt;/P&gt;
&lt;P&gt;insert into precision_1 partition(date='2019-01-02')&amp;nbsp; values ('1', 3.765894);&lt;/P&gt;
&lt;P&gt;'SELECT * from precision_1' works only in hive but not in imala&lt;/P&gt;
&lt;P&gt;In impala throws the below erorr.&lt;/P&gt;
&lt;P&gt;Bad status for request TFetchResultsReq(fetchType=0, operationHandle=TOperationHandle(hasResultSet=True, modifiedRowCount=None, operationType=0, operationId=THandleIdentifier(secret='pq)"\xf9LNN\x00\x00\x00\x00\xb1Z\x17{', guid='pq)"\xf9LNN\x00\x00\x00\x00\xb1Z\x17{')), orientation=4, maxRows=100): TFetchResultsResp(status=TStatus(errorCode=None, errorMessage="File 'hdfs://devana1/user/hive/warehouse/precision_1/date=2019-02-01/000000_0_copy_1' column 'prec' has a scale that does not match the table metadata scale. File metadata scale: 2 Table metadata scale: 6\n", sqlState='HY000', infoMessages=None, statusCode=3), results=None, hasMoreRows=None)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;kindly suggest&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2019 12:46:00 GMT</pubDate>
    <dc:creator>ravikumashi</dc:creator>
    <dc:date>2019-09-16T12:46:00Z</dc:date>
  </channel>
</rss>

