Zoltán Borók-Nagy created HIVE-25226:
----------------------------------------

             Summary: Hive changes 'storage_handler' for existing Iceberg table 
when hive.engine.enabled is false
                 Key: HIVE-25226
                 URL: https://issues.apache.org/jira/browse/HIVE-25226
             Project: Hive
          Issue Type: Bug
            Reporter: Zoltán Borók-Nagy


If Hive writes to an existing Iceberg table but property 'hive.engine.enabled' 
is not set, then Hive rewrites the table metadata with different 
SerDe/Input/Output format than it had before.

E.g. there's an existing table with the following metadata:
{noformat}
                  storage_handler                              | 
org.apache.iceberg.mr.hive.HiveIcebergStorageHandler
| SerDe Library: | org.apache.iceberg.mr.hive.HiveIcebergSerDe | NULL |
| InputFormat:   | org.apache.iceberg.mr.hive.HiveIcebergInputFormat | NULL |
| OutputFormat:  | org.apache.iceberg.mr.hive.HiveIcebergOutputFormat | NULL |
{noformat}
Now when Hive inserts to this table it clears 'storage_handler' and rewrites 
the rest:
{noformat}
| SerDe Library:                | 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe | NULL                       
                        |
| InputFormat:                  | org.apache.hadoop.mapred.FileInputFormat      
     | NULL                                               |
| OutputFormat:                 | org.apache.hadoop.mapred.FileOutputFormat     
     | NULL                                               |
{noformat}
This means the table becomes unreadable:
{noformat}
Error: java.io.IOException: java.io.IOException: Cannot create an instance of 
InputFormat class org.apache.hadoop.mapred.FileInputFormat as specified in 
mapredWork! (state=,code=0)
{noformat}

I think Hive should always set 'hive.engine.enabled' for Iceberg.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to