[
https://issues.apache.org/jira/browse/IMPALA-8734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16878017#comment-16878017
]
ASF subversion and git services commented on IMPALA-8734:
---------------------------------------------------------
Commit 252b117954065db68eba746ca5afb0476c94313b in impala's branch
refs/heads/master from Fredy Wijaya
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=252b117 ]
IMPALA-8734: Reload table schema on TBLPROPERTIES change
Prior to this patch, an INVALIDATE METADATA was required when altering
the TBLPROPERTIES for the changes to take effect. With this patch the
table schema is automatically reloaded on TBLPROPERTIES change.
Testing:
- Added a new test in test_ddl.py
- Ran test_ddl.py
Change-Id: I2a43a962c2a456f3ddc078b2924f551fccb5c2ad
Reviewed-on: http://gerrit.cloudera.org:8080/13785
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> ALTER TABLE ... SET TBLPROPERTIES doesn't propagate until Invalidate Metadata
> -----------------------------------------------------------------------------
>
> Key: IMPALA-8734
> URL: https://issues.apache.org/jira/browse/IMPALA-8734
> Project: IMPALA
> Issue Type: Improvement
> Affects Versions: Impala 3.3.0
> Reporter: Vincent Tran
> Assignee: Fredy Wijaya
> Priority: Major
> Fix For: Impala 3.3.0
>
>
> More particularly, if one needs to change the data representation of NULL in
> the tblproperties, an INVALIDATE METADATA is needed for table to be readable
> with the new `serialization.null.format`
> To setup, create a table and dfs -put some data files into hdfs with some
> null strings:
> {noformat}
> [localhost:21000] default> create table v.t1(c1 string);
> Query: create table v.t1(c1 string)
> +-------------------------+
> | summary |
> +-------------------------+
> | Table has been created. |
> +-------------------------+
> Fetched 1 row(s) in 0.51s
> [localhost:21000] default> show create table v.t1;
> Query: show create table v.t1
> +----------------------------------------------------------+
> | result |
> +----------------------------------------------------------+
> | CREATE TABLE v.t1 ( |
> | c1 STRING |
> | ) |
> | STORED AS TEXTFILE |
> | LOCATION 'hdfs://localhost:20500/test-warehouse/v.db/t1' |
> | |
> +----------------------------------------------------------+
> Fetched 1 row(s) in 4.38s
> [localhost:21000] default> !printf '\nnull\n' > f;
> --------
> Executed in 0.00s
> [localhost:21000] default> !hdfs dfs -put f /test-warehouse/v.db/t1/f1;
> --------
> Executed in 1.98s{noformat}
>
> Repro:
> {noformat}
> [localhost:21000] default> select * from v.t1;
> Query: select * from v.t1
> Query submitted at: 2019-06-27 12:48:13 (Coordinator:
> http://blackbox.vpc.cloudera.com:25000)
> Query progress can be monitored at:
> http://blackbox.vpc.cloudera.com:25000/query_plan?query_id=8b4532852b10613e:e9e4847500000000
> +------+
> | c1 |
> +------+
> | |
> | null |
> +------+
> Fetched 2 row(s) in 4.77s
> [localhost:21000] default> alter table v.t1 set
> tblproperties("serialization.null.format"="null");
> Query: alter table v.t1 set tblproperties("serialization.null.format"="null")
> +----------------+
> | summary |
> +----------------+
> | Updated table. |
> +----------------+
> Fetched 1 row(s) in 0.05s
> [localhost:21000] default> select * from v.t1;
> Query: select * from v.t1
> Query submitted at: 2019-06-27 12:48:39 (Coordinator:
> http://blackbox.vpc.cloudera.com:25000)
> Query progress can be monitored at:
> http://blackbox.vpc.cloudera.com:25000/query_plan?query_id=e54749def520fa97:9800728300000000
> +------+
> | c1 |
> +------+
> | |
> | null |
> +------+
> Fetched 2 row(s) in 0.11s
> [localhost:21000] default> invalidate metadata v.t1;
> Query: invalidate metadata v.t1
> Query submitted at: 2019-06-27 12:48:50 (Coordinator:
> http://blackbox.vpc.cloudera.com:25000)
> Query progress can be monitored at:
> http://blackbox.vpc.cloudera.com:25000/query_plan?query_id=9d41e48bc8d5bad3:8020514f00000000
> Fetched 0 row(s) in 0.01s
> [localhost:21000] default> select * from v.t1;
> Query: select * from v.t1
> Query submitted at: 2019-06-27 12:48:51 (Coordinator:
> http://blackbox.vpc.cloudera.com:25000)
> Query progress can be monitored at:
> http://blackbox.vpc.cloudera.com:25000/query_plan?query_id=0446c2c65af3400a:3e3a484900000000
> +------+
> | c1 |
> +------+
> | |
> | NULL |
> +------+
> Fetched 2 row(s) in 4.48s
> [localhost:21000] default>{noformat}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]