hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cheng Lian (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-14294) HiveSchemaConverter for Parquet doesn't translate TINYINT and SMALLINT into proper Parquet types
Date Wed, 20 Jul 2016 06:44:20 GMT

    [ https://issues.apache.org/jira/browse/HIVE-14294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15385452#comment-15385452
] 

Cheng Lian commented on HIVE-14294:
-----------------------------------

Hit this issue while investigating SPARK-16632.

> HiveSchemaConverter for Parquet doesn't translate TINYINT and SMALLINT into proper Parquet
types
> ------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-14294
>                 URL: https://issues.apache.org/jira/browse/HIVE-14294
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.2.1, 2.1.0
>            Reporter: Cheng Lian
>
> To reproduce this issue, run the following DDL:
> {code:sql}
> CREATE TABLE foo STORED AS PARQUET AS SELECT CAST(1 AS TINYINT);
> {code}
> And then check the schema of the written Parquet file:
> {noformat}
> $ parquet-schema $WAREHOUSE_PATH/foo/000000_0
> message hive_schema {
>   optional int32 _c0;
> }
> {noformat}
> When translating Hive types into Parquet types, {{TINYINT}} and {{SMALLINT}} should be
translated into the {{int32 (INT_8)}} and {{int32 (INT_16)}} respectively. However, {{HiveSchemaConverter}}
converts all of {{TINYINT}}, {{SMALLINT}}, and {{INT}} into Parquet {{int32}}. This causes
problem when accessing Parquet files generated by Hive in other systems since type information
gets wrong.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message