Yang, Tong 6182f91ba8 MRS component operation guide_normal 2.0.38.SP20 version
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>
2022-12-09 14:55:21 +00:00

18 lines
1.6 KiB
HTML

<a name="mrs_01_24081"></a><a name="mrs_01_24081"></a>
<h1 class="topictitle1">SQLException Is Reported During Hive Data Synchronization</h1>
<div id="body0000001146663107"><div class="section" id="mrs_01_24081__section194431819201410"><h4 class="sectiontitle">Question</h4><p id="mrs_01_24081__p16909143612459">The following error is reported during Hive data synchronization:</p>
<pre class="screen" id="mrs_01_24081__screen929054174515">Caused by: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Unable to alter table. The following columns have types incompatible with the existing columns in their respective positions :
__col1,__col2</pre>
</div>
<div class="section" id="mrs_01_24081__section767133013143"><h4 class="sectiontitle">Answer</h4><p id="mrs_01_24081__p128833417151">This error usually occurs when you try to add a new column to an existing Hive table using the <strong id="mrs_01_24081__b1470224015336">HiveSyncTool.java</strong> class. Databases usually do not allow the modification of a column data type from a higher order to lower order or cases where the data types may conflict with the data that is already stored or will be stored in the table. To solve this problem, </p>
<p id="mrs_01_24081__p17288153410151">set <strong id="mrs_01_24081__b040634217371">hive.metastore.disallow.in compatible.col.type.changes</strong> to <strong id="mrs_01_24081__b1283016432372">false</strong>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24080.html">Hive Synchronization</a></div>
</div>
</div>