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 "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/10/12 23:07: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=17616725#comment-17616725 ] 

ASF subversion and git services commented on IMPALA-9460:
---------------------------------------------------------

Commit 44c0e00f59f469ba5435351861a51381c753b4c4 in impala's branch refs/heads/master from Peter Rozsa
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=44c0e00f5 ]

IMPALA-9460: ADD PARTITION doesn't accept SET FORMAT

This change adds the possibility to set the partition file format
at creation by allowing to use the SET FORMAT clause at the end of
the ALTER TABLE ADD statement. The file format specification will
be applied to all listed partitions, for example:
ALTER TABLE tbl ADD PARTITION (i=1) PARTITION (i=2) SET FILEFORMAT
PARQUET; will create two Parquet-formatted partition metadata
entries.

Tests:
 - analyzer test for the new syntax element
 - e2e test for adding partition in a specified format

Change-Id: I2f78cc3c7eba25383128cd8fd881dd41ddea8b69
Reviewed-on: http://gerrit.cloudera.org:8080/19099
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> 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: Peter Rozsa
>            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.20.10#820010)

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