Mala Chikka Kempanna created IMPALA-6778:
--------------------------------------------

             Summary: Compute stats alters table location
                 Key: IMPALA-6778
                 URL: https://issues.apache.org/jira/browse/IMPALA-6778
             Project: IMPALA
          Issue Type: Improvement
    Affects Versions: Impala 2.11.0, Impala 2.10.0
            Reporter: Mala Chikka Kempanna


Impala is changing table location when doing compute stats.

Repro steps below:

 

On hive

{code}

create table default.t01 (col1 string);

desc formatted default.t01;

Note - Location: 
hdfs://nightly513-unsecure-1.gce.cloudera.com:8020/user/hive/warehouse/t01

{code} 

 

On impala

{code}

[nightly514-unsecure-2.gce.cloudera.com:21000] > invalidate metadata;

[nightly514-unsecure-2.gce.cloudera.com:21000] > desc formatted default.t01;

{code}


On hive - alter location

{code}

hive>!hadoop fs -mkdir /tmp/t01;

hive>alter table default.t01 set location '/tmp/t01';

hive>desc formatted default.t01;

Note - Location: hdfs://nightly514-unsecure-1.gce.cloudera.com:8020/tmp/t01

{code}


Now on impala, run compute stats on this table without doing an invalidate, i.e 
on the last location that impala remembers.

{code}

[nightly514-unsecure-2.gce.cloudera.com:21000] > COMPUTE STATS default.t01;

{code}

 

On hive

{code}

hive>desc formatted default.t01;

Note- Location: 
hdfs://nightly513-unsecure-1.gce.cloudera.com:8020/user/hive/warehouse/t01

{code}


You can see in hive describe output that, Impala has changed the location of 
the table back to what it knew before, rather than picking up what is stored in 
metastore.



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

Reply via email to