You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Na Li (JIRA)" <ji...@apache.org> on 2018/05/18 20:00:00 UTC

[jira] [Updated] (SENTRY-2239) FullUpdateModifier does not handle alter table rename correctly

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

Na Li updated SENTRY-2239:
--------------------------
    Description: 
This only happens if there are "alter table rename" during taking full snapshot.

When alter table rename changes DB name of the table, FullUpdateModifier changes all tables' DB name, not just the table whose name is changed. This will change the table names incorrectly.

For example, when user changes table name from "db1.table1" to table name to "db2.table2" and in db1 there are two other tables: db1.table3, db1.table4, FullUpdateModifier changes the tables from "db1.table1, db1.table3, db1.table4" to "db2.table2, db2.table3, db3.table4". 

The desired behavior is changes the tables from "db1.table1" to "db2.table2". and "db1.table3, db1.table4" remains the same.



  was:
When alter table rename changes DB name of the table, FullUpdateModifier changes all tables' DB name, not just the table whose name is changed.

This will change the table names incorrectly.

For example, when user changes table name from "db1.table1" to table name to "db2.table2" and in db1 there are two other tables: db1.table3, db1.table4, FullUpdateModifier changes the tables from "db1.table1, db1.table3, db1.table4" to "db2.table2, db2.table3, db3.table4". 

The desired behavior is changes the tables from "db1.table1" to "db2.table2". and "db1.table3, db1.table4" remains the same.


> FullUpdateModifier does not handle alter table rename correctly
> ---------------------------------------------------------------
>
>                 Key: SENTRY-2239
>                 URL: https://issues.apache.org/jira/browse/SENTRY-2239
>             Project: Sentry
>          Issue Type: Bug
>            Reporter: Na Li
>            Priority: Major
>
> This only happens if there are "alter table rename" during taking full snapshot.
> When alter table rename changes DB name of the table, FullUpdateModifier changes all tables' DB name, not just the table whose name is changed. This will change the table names incorrectly.
> For example, when user changes table name from "db1.table1" to table name to "db2.table2" and in db1 there are two other tables: db1.table3, db1.table4, FullUpdateModifier changes the tables from "db1.table1, db1.table3, db1.table4" to "db2.table2, db2.table3, db3.table4". 
> The desired behavior is changes the tables from "db1.table1" to "db2.table2". and "db1.table3, db1.table4" remains the same.



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