[
https://issues.apache.org/jira/browse/HUDI-4356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
董可伦 updated HUDI-4356:
----------------------
Description:
the error due to the wrong configuration
{{hoodie.datasource.hive_sync.database}}
Example:
h2. partitionTable
h3. CTAS
use hudi; create table test_hudi_table using hudi partitioned by(dt) options(
primaryKey = 'id', preCombineField = 'ts', type = 'cow' ) AS select 1 as id,
'a1' as name, 10 as price, 1000 as ts,'2022-07-03' as dt;
h3. result
two tables is created by sync hive;{{{}EXTERNAL default.test_hudi_table{}}} and
{{{}hudi.test_hudi_table{}}},And added a partition in
{{default.test_hudi_table}} but the{{{}hudi.test_hudi_table{}}} didn't,So it is
empty when querying the table {{hudi.test_hudi_table}}
h2. noPartitionTable
use hudi; create table test_hudi_table_2 using hudi options( primaryKey = 'id',
preCombineField = 'ts', type = 'cow' ) AS select 1 as id, 'a1' as name, 10 as
price, 1000 as ts,'2022-07-03' as dt;
two tables is created by sync hive;{{{}EXTERNAL default.test_hudi_table_2
{}}}and {{hudi.test_hudi_table_2 }},Both tables can be queried normally, but we
should only synchronize one table
> Fix the error when sync hive in CTAS
> ------------------------------------
>
> Key: HUDI-4356
> URL: https://issues.apache.org/jira/browse/HUDI-4356
> Project: Apache Hudi
> Issue Type: Bug
> Components: spark-sql
> Affects Versions: 0.9.0, 0.10.0, 0.10.1
> Reporter: 董可伦
> Assignee: 董可伦
> Priority: Major
> Labels: pull-request-available
>
> the error due to the wrong configuration
> {{hoodie.datasource.hive_sync.database}}
> Example:
> h2. partitionTable
> h3. CTAS
> use hudi; create table test_hudi_table using hudi partitioned by(dt) options(
> primaryKey = 'id', preCombineField = 'ts', type = 'cow' ) AS select 1 as id,
> 'a1' as name, 10 as price, 1000 as ts,'2022-07-03' as dt;
> h3. result
> two tables is created by sync hive;{{{}EXTERNAL default.test_hudi_table{}}}
> and {{{}hudi.test_hudi_table{}}},And added a partition in
> {{default.test_hudi_table}} but the{{{}hudi.test_hudi_table{}}} didn't,So it
> is empty when querying the table {{hudi.test_hudi_table}}
> h2. noPartitionTable
> use hudi; create table test_hudi_table_2 using hudi options( primaryKey =
> 'id', preCombineField = 'ts', type = 'cow' ) AS select 1 as id, 'a1' as name,
> 10 as price, 1000 as ts,'2022-07-03' as dt;
> two tables is created by sync hive;{{{}EXTERNAL default.test_hudi_table_2
> {}}}and {{hudi.test_hudi_table_2 }},Both tables can be queried normally, but
> we should only synchronize one table
--
This message was sent by Atlassian Jira
(v8.20.10#820010)