[
https://issues.apache.org/jira/browse/HUDI-3253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yann Byron updated HUDI-3253:
-----------------------------
Description:
When we create a hudi table with specified location which isn't the subpath of
the current database's location, and then turn this table to a managed table,
it'll fail to find the right table path.
The steps you can run to reproduce:
{code:java}
// create table in SPARK
create table if not exists cow_nonpt_nonpcf_tbl (
id int,
name string,
price double
) using hudi
options (
type = 'cow',
primaryKey = 'id'
)
location '/user/hudi/cow_nonpt_nonpcf_tbl';
// turn it to a managed table in HIVE
alter table cow_nonpt_nonpcf_tbl set tblproperties ('EXTERNAL'='false');
// insert some data in SPARK
insert into cow_nonpt_nonpcf_tbl select 1, 'a1', 20;
// will throw FileNotFoundException{code}
was:
When we create a hudi table with specified location which isn't the subpath of
the current database's location, and then turn this table to a managed table,
it'll fail to find the right table path.
The steps you can run to reproduce:
{code:java}
// create table in SPARK
create table if not exists cow_nonpt_nonpcf_tbl (
id int,
name string,
price double
) using hudi
options (
type = 'cow',
primaryKey = 'id'
);
// turn it to a managed table in HIVE
alter table cow_nonpt_nonpcf_tbl set tblproperties ('EXTERNAL'='false');
// insert some data in SPARK
insert into cow_nonpt_nonpcf_tbl select 1, 'a1', 20;
// will throw FileNotFoundException{code}
> preferred to use table's location
> ---------------------------------
>
> Key: HUDI-3253
> URL: https://issues.apache.org/jira/browse/HUDI-3253
> Project: Apache Hudi
> Issue Type: Bug
> Components: Spark SQL
> Reporter: Yann Byron
> Assignee: Yann Byron
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.11.0
>
>
> When we create a hudi table with specified location which isn't the subpath
> of the current database's location, and then turn this table to a managed
> table, it'll fail to find the right table path.
> The steps you can run to reproduce:
>
> {code:java}
> // create table in SPARK
> create table if not exists cow_nonpt_nonpcf_tbl (
> id int,
> name string,
> price double
> ) using hudi
> options (
> type = 'cow',
> primaryKey = 'id'
> )
> location '/user/hudi/cow_nonpt_nonpcf_tbl';
> // turn it to a managed table in HIVE
> alter table cow_nonpt_nonpcf_tbl set tblproperties ('EXTERNAL'='false');
> // insert some data in SPARK
> insert into cow_nonpt_nonpcf_tbl select 1, 'a1', 20;
> // will throw FileNotFoundException{code}
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)