Hi Sylvester,

You can set this specific configuration value per session since HIVE-17832 - 
Fixed in: Hive 3.0.0, Hive 2.4.0

So you can do this change this value through thrift if your metastore version 
is higher or equal than 2.4.0, or 3.0.0, but not with 1.2.1

If you want to use 1.2.1 version you can change the configuration in the 
hive-site.xml which is used by the metastore service.

Hope this helps,

> On Jul 10, 2018, at 22:09, Sylvester Steele <sylvesterstee...@gmail.com> 
> wrote:
> Hello,
> I am using hive-metastore jar version 1.2.1 and Hive version 2.3.2. I'd like 
> to make incompatible schema changes to my Hive tables.
> The change I'm trying to make is to drop a column, which I am doing like so: 
> table.getSd().setCols(remaining_cols). I'm dropping an int column. The column 
> following it is a struct column, so my understanding is that it assumes I'm 
> trying to convert an int column to a struct column.
> The error I get is:
> InvalidOperationException(message:The following columns have types 
> incompatible with the existing columns in their respective positions...
> Doing 
> ThriftHiveMetastore.Client client = new ThriftHiveMetastore.Client(protocol);
> client.get_config_value("hive.metastore.disallow.incompatible.col.type.changes",
>  "default_value");
> gives me a true, which explains the failure earlier. How do I override this 
> value to false? Also, AFAICT the default value is supposed to be false, so 
> I'm not sure why this is returning true. I checked the hive-site.xml file and 
> it doesn't have this set.
> Thanks for your help!

Reply via email to