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 "Sultan .S (Jira)" <ji...@apache.org> on 2022/09/12 10:42:00 UTC

[jira] [Updated] (IMPALA-11574) Impala won't change location of data files after using alter rename table

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

Sultan .S updated IMPALA-11574:
-------------------------------
    Description: 
Hi, I'm facing an issue where after using an alter to change the table name of a table created by a CTAS the data files locations stays the same with old table name. I have a script that generate reports is running daily that uses hot swap for the past year now its not working as intended. we upgraded from impala 3.2 to 3.4 recently so I think the upgrade is related to this issue. were there some changes on the behavior of alter statement?

the problem caused by doing the following:

alter table db.main_table rename to db.main_table_flagged_del

alter table db.temp_table rename to db.main_table

drop table db.main_table_flagged_del

now after the second daily run of this script the flagged table will point to the same file directory as the main table so dropping flagged table will drop main table too.

this used to work with impala 3.2 so I wonder if there were backend changes that affected the behavior of alter statement.

I tried to force converting these tables to managed tables but the results are the same.

  was:
Hi, I'm facing an issue where after using an alter to change the table name of a managed table the data files locations stays the same with old table name. I have a script that generate reports is running daily that uses hot swap for the past year now its not working as intended. we upgraded from impala 3.2 to 3.4 recently so I think the upgrade is related to this issue. were there some changes on the behavior of alter statement?

the problem caused by doing the following:

alter table db.main_table rename to db.main_table_flagged_del

alter table db.temp_table rename to db.main_table

drop table db.main_table_flagged_del

now after the second daily run of this script the flagged table will point to the same file directory as the main table so dropping flagged table will drop main table too.

this used to work with impala 3.2 so I wonder if there were backend changes that affected the behavior of alter statement.


> Impala won't change location of data files after using alter rename table
> -------------------------------------------------------------------------
>
>                 Key: IMPALA-11574
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11574
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 3.4.0
>            Reporter: Sultan .S
>            Priority: Major
>
> Hi, I'm facing an issue where after using an alter to change the table name of a table created by a CTAS the data files locations stays the same with old table name. I have a script that generate reports is running daily that uses hot swap for the past year now its not working as intended. we upgraded from impala 3.2 to 3.4 recently so I think the upgrade is related to this issue. were there some changes on the behavior of alter statement?
> the problem caused by doing the following:
> alter table db.main_table rename to db.main_table_flagged_del
> alter table db.temp_table rename to db.main_table
> drop table db.main_table_flagged_del
> now after the second daily run of this script the flagged table will point to the same file directory as the main table so dropping flagged table will drop main table too.
> this used to work with impala 3.2 so I wonder if there were backend changes that affected the behavior of alter statement.
> I tried to force converting these tables to managed tables but the results are the same.



--
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