zhangjun0x01 commented on PR #471:
URL: 
https://github.com/apache/flink-table-store/pull/471#issuecomment-1376977673

   > Thanks @zhangjun0x01 for the contribution.
   > 
   > Maybe there is a problem here. You didn't rename the entire table file 
directory. Our current design has determined that the path of the table is: 
`warehouse/xx.db/tableName`, see `AbstractCatalog.getTableLocation`.
   > 
   > You should query table after renaming.
   
   I put the final jar into flink cluster lib dir, and test it in flink cluster 
,I fount it is fine, the location is updated to the new location
   
   I used the following sql in the source code of the flink-table-store to 
test, and I found that the function is also normal
   
   ```
       @Test
       public void testRename() {
           final StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();
           StreamTableEnvironment tEnv = StreamTableEnvironment.create(env);
           tEnv.executeSql("CREATE CATALOG fts_hive_catalog WITH (\n" + "  " +
                   " 'type' = 'table-store',\n" + "    " +
                   "'metastore' = 'hive',\n" + "   " +
                   " 'uri' = 'thrift://localhost:9083',\n" + " " +
                   " 'warehouse' = 
'file:///Users/zhangjun/work/data/hive_metastore'\n" + ")");
           tEnv.useCatalog("fts_hive_catalog");
           tEnv.useDatabase("zhangjun");
   
           tEnv.executeSql("alter table fts_table5 rename to fts_table6");
           tEnv.executeSql("show tables").print();
       }
   ```
   
   So I wonder if there is a problem with the hive test environment ?
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to