Hi

I'm struggling to override the
'hive.metastore.disallow.incompatible.col.type.changes' conf.
I've got a table (Parquet format) which needs some columns renamed/dropped,
structs changed, Hive cli doesn't have the option to drop columns so I'm
going Hive thrift api route but keep getting the exception:
Exception in thread "main" InvalidOperationException(message:The following
columns have types incompatible with the existing columns in their
respective positions

Which is coming from here.
https://github.com/apache/hive/blob/rel/release-2.3.7/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java#L153

This check is controlled by the property:
hive.metastore.disallow.incompatible.col.type.changes
But this seems to be set in the metastore (server) and from my thrift
client any override is not picked up.
This is how I create my client:
    HiveConf hiveConf = new HiveConf();
    hiveConf.set("hive.metastore.disallow.incompatible.col.type.changes",
"false");
    hiveConf.set("metastore.disallow.incompatible.col.type.changes",
"false");
    HiveMetaStoreClient client = new HiveMetaStoreClient(hiveConf);

I've tried adding the property in the EnvironmentContext or setting the
MetaConf but that all didn't help. From my tests it only seems to work if I
change it server side.Client and metastore are on Hive 2.3.7.

Is it possible to override?

Thanks,
 Patrick

Reply via email to