You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Kris Hahn (Jira)" <ji...@apache.org> on 2020/03/09 01:10:00 UTC

[jira] [Commented] (IMPALA-9460) ADD PARTITION doesn't accept SET FORMAT

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

Kris Hahn commented on IMPALA-9460:
-----------------------------------

Does this workaround address the same problem?

[https://impala.apache.org/docs/build/html/topics/impala_partitioning.html]
{quote}For other file types that Impala cannot create natively, you can switch into Hive and issue the ALTER TABLE ... SET FILEFORMAT statements and INSERT or LOAD DATA statements there. After switching back to Impala, issue a REFRESH table_name statement so that Impala recognizes any partitions or new data added through Hive.
{quote}
 

> ADD PARTITION doesn't accept SET FORMAT
> ---------------------------------------
>
>                 Key: IMPALA-9460
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9460
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 3.3.0
>            Reporter: Gabor Kaszab
>            Assignee: Kris Hahn
>            Priority: Major
>              Labels: ramp-up, sql-language
>
> The Impala docs say this should work, however, I get an error:
> {code:java}
> alter table tbl_name add partition (i=3) set fileformat orc;{code}
> {code:java}
> ERROR: ParseException: Syntax error in line 1:
> ..._name add partition (i=3) set fileformat orc
>                              ^
> Encountered: SET
> Expected: CACHED, LOCATION, PARTITION, UNCACHEDCAUSED BY: Exception: Syntax error{code}
>  
> There is a workaround to create the partition first with the default fileformat of the table and in a separate step change the format:
> {code:java}
> alter tbl_name add partition (i=2);
> alter table tbl_name partition (i=2) set fileformat orc;
> +-------------------------+
> | summary                 |
> +-------------------------+
> | Updated 1 partition(s). |
> +-------------------------+{code}
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org