[ https://issues.apache.org/jira/browse/HUDI-3861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17521065#comment-17521065 ]
KnightChess edited comment on HUDI-3861 at 4/12/22 10:28 AM: ------------------------------------------------------------- [~xleesf] If the table type is {*}MANAGED{*}, the real table path and sd.path will be update, but the path in tblp not be update in code : [https://github.com/apache/hudi/blob/master/hudi-spark-datasource/hudi-spark3/src/main/scala/org/apache/spark/sql/hudi/catalog/HoodieCatalog.scala#L224] was (Author: knightchess): [~xleesf] If the table is manages, the real table path and sd.path will be update, but the path in tblp not be update in code : https://github.com/apache/hudi/blob/master/hudi-spark-datasource/hudi-spark3/src/main/scala/org/apache/spark/sql/hudi/catalog/HoodieCatalog.scala#L224 > 'path' in CatalogTable#properties failed to be updated when renaming table > -------------------------------------------------------------------------- > > Key: HUDI-3861 > URL: https://issues.apache.org/jira/browse/HUDI-3861 > Project: Apache Hudi > Issue Type: Bug > Reporter: Jin Xing > Priority: Minor > > Reproduce the issue as below > {code:java} > 1. Create a MOR table > create table mor_simple( > id int, > name string, > price double > ) > using hudi > options ( > type = 'cow', > primaryKey = 'id' > ) > 2. Renaming > alter table mor_simple rename to mor_simple0 > 3. Show create table mor_simple0 > Output as > CREATE TABLE hudi.mor_simple0 ( > `_hoodie_commit_time` STRING, > `_hoodie_commit_seqno` STRING, > `_hoodie_record_key` STRING, > `_hoodie_partition_path` STRING, > `_hoodie_file_name` STRING, > `id` INT, > `name` STRING, > `price` DOUBLE) > USING hudi > OPTIONS( > 'primaryKey' = 'id', > 'type' = 'cow') > TBLPROPERTIES( > 'path' = '/user/hive/warehous/hudi.db/mor_simple'){code} > As we can see, the 'path' property is > '/user/hive/warehous/hudi.db/mor_simple', rather than > '/user/hive/warehous/hudi.db/mor_simple0'. > -- This message was sent by Atlassian Jira (v8.20.1#820001)