You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Vincent Tran (JIRA)" <ji...@apache.org> on 2018/03/14 22:30:00 UTC

[jira] [Resolved] (IMPALA-4324) We should automatically set default file format parameters when a table is created or altered

     [ https://issues.apache.org/jira/browse/IMPALA-4324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vincent Tran resolved IMPALA-4324.
----------------------------------
    Resolution: Not A Bug

> We should automatically set default file format parameters when a table is created or altered
> ---------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-4324
>                 URL: https://issues.apache.org/jira/browse/IMPALA-4324
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 2.8.0
>            Reporter: Taras Bobrovytsky
>            Assignee: Vincent Tran
>            Priority: Major
>              Labels: newbie
>
> The following sequence of queries results in a table that cannot be read:
> {code}
> create external table jointbl_test like functional_parquet.jointbl;
> alter table jointbl_test set location '/test-warehouse/jointbl_seq';
> alter table jointbl_test set fileformat sequencefile;
> select * from jointbl_test;
> {code}
> Result:
> {code}
> +---------+-----------+----------+-------------+
> | test_id | test_name | test_zip | alltypes_id |
> +---------+-----------+----------+-------------+
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> | NULL    | NULL      | NULL     | NULL        |
> +---------+-----------+----------+-------------+
> WARNINGS: Error converting column: 0 to BIGINT
> Error parsing row: file: hdfs://localhost:20500/test-warehouse/jointbl_seq/000000_0, before offset: 121
> Error converting column: 0 to BIGINT
> Error parsing row: file: hdfs://localhost:20500/test-warehouse/jointbl_seq/000000_0, before offset: 155
> {code}
> A similar problem happens with CREATE TABLE. The following query also results in a table that cannot be read:
> {code}
> CREATE EXTERNAL TABLE jointbl2 (
>   test_id BIGINT, 
>   test_name STRING, 
>   test_zip INT, 
>   alltypes_id INT
> )
> STORED AS SEQUENCEFILE
> LOCATION 'hdfs://localhost:20500/test-warehouse/jointbl_seq'
> TBLPROPERTIES ('numFiles'='0', 'COLUMN_STATS_ACCURATE'='false', 'transient_lastDdlTime'='1476743954', 'numRows'='-1', 'totalSize'='0', 'rawDataSize'='-1')
> {code}
> The reason why this does not work currently is because ROW FORMAT and SERDEPROPERTIES are not set. A sane default should either be set automatically, or a warning should be given.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)