hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barna Zsombor Klara (JIRA)" <>
Subject [jira] [Commented] (HIVE-16559) Parquet schema evolution for partitioned tables may break if table and partition serdes differ
Date Mon, 08 May 2017 17:23:04 GMT


Barna Zsombor Klara commented on HIVE-16559:

I ran the same test as in the Jira description but with ORC as the file format and HIVE_SCHEMA_EVOLUTION
set to false and ended up with:{{Error: java.lang.ClassCastException: cannot be cast to (state=,code=0)}}
when trying to select from the altered table. 
I don't think ORC supports this either.
But then again I don't really understand that check for ORC, how does setting HIVE_SCHEMA_EVOLUTION
to false end up with a "supported" mode for schema evolution?

> Parquet schema evolution for partitioned tables may break if table and partition serdes
> ----------------------------------------------------------------------------------------------
>                 Key: HIVE-16559
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: Serializers/Deserializers
>            Reporter: Barna Zsombor Klara
>            Assignee: Barna Zsombor Klara
>             Fix For: 3.0.0
>         Attachments: HIVE-16559.01.patch
> Parquet schema evolution should make it possible to have partitions/tables 
>  backed by files with different schemas. Hive should match the table columns with file
columns based on the column name if possible.
> However if the serde for a table is missing columns from the serde of a partition Hive
fails to match the columns together.
> Steps to reproduce:
> {code}
> CREATE TABLE myparquettable_parted
> (
>   name string,
>   favnumber int,
>   favcolor string,
>   age int,
>   favpet string
> )
> PARTITIONED BY (day string)
> INSERT OVERWRITE TABLE myparquettable_parted
> PARTITION(day='2017-04-04')
>    'mary' as name,
>    5 AS favnumber,
>    'blue' AS favcolor,
>    35 AS age,
>    'dog' AS favpet;
> alter table myparquettable_parted
> (
> favnumber int,
> age int
> );   <!--- No cascade option, so the partition will not be altered. 
> {code}
> {{SELECT * FROM myparquettable_parted where day='2017-04-04';}}
> will fail with:
> {{java.lang.UnsupportedOperationException: Cannot inspect}}
> Hive should either match the columns together or prevent the user from dropping columns
from the table.

This message was sent by Atlassian JIRA

View raw message