title: duplicate key name while upgrading hive
body: <p>while trying to upgrade hive from 2.1.0 to 2.3.0 getting below error
  (actually upgrading emr 5.7.0 to 5.8.0)</p>
  
  <p><code>init hive-metastore schema]/returns: 0: jdbc:mysql://connection_string-&gt; CREATE INDEX PCS_STATS_IDX ON PART_COL_STATS (DB_NAME,TABLE_NAME,COLUMN_NAME,PARTITION_NAME) USING BTREE</code>
  <code>Notice: /Stage[main]/Hadoop_hive::Init_metastore_schema/Exec[init hive-metastore schema]/returns: Error: Duplicate key name 'PCS_STATS_IDX' (state=42000,code=1061)</code>
  <code>Notice: /Stage[main]/Hadoop_hive::Init_metastore_schema/Exec[init hive-metastore schema]/returns:</code>
  <code>Notice: /Stage[main]/Hadoop_hive::Init_metastore_schema/Exec[init hive-metastore schema]/returns: Closing: 0: jdbc:mysql://connection_string:3306/hive?createDatabaseIfNotExist=true</code>
  <code>Notice: /Stage[main]/Hadoop_hive::Init_metastore_schema/Exec[init hive-metastore schema]/returns: org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !!</code>
  <code>Notice: /Stage[main]/Hadoop_hive::Init_metastore_schema/Exec[init hive-metastore schema]/returns:  at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:586)</code>
  <code>Notice: /Stage[main]/Hadoop_hive::Init_metastore_schema/Exec[init hive-metastore schema]/returns:  ... 8 more</code>
  <code>Notice: /Stage[main]/Hadoop_hive::Init_metastore_schema/Exec[init hive-metastore schema]/returns: *** schemaTool failed ***</code></p>
  
  <p>Is there a way to resolve without manually dropping already created index PCS_STATS_IDX in hive external metastore?</p>