You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Sagar Sumit (Jira)" <ji...@apache.org> on 2022/09/21 08:53:00 UTC
[jira] [Closed] (HUDI-4729) File group in pending compaction can not be queried when query ro table with spark
[ https://issues.apache.org/jira/browse/HUDI-4729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sagar Sumit closed HUDI-4729.
-----------------------------
Resolution: Fixed
> File group in pending compaction can not be queried when query ro table with spark
> ----------------------------------------------------------------------------------
>
> Key: HUDI-4729
> URL: https://issues.apache.org/jira/browse/HUDI-4729
> Project: Apache Hudi
> Issue Type: Bug
> Components: spark-sql
> Reporter: jimmyz
> Assignee: jimmyz
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.12.1
>
>
> reproduced steps:
> 1. create table
>
> {code:sql}
> create table h0 (
> id int,
> name string,
> price double,
> ts long
> ) using hudi
> partitioned by (ts)
> location '/private/var/folders/7p/8jjkvq110l348cd34v5lvbsc0000gn/T/spark-425a5d4e-6b7d-440e-b071-3c524f3ca727/h0'
> tblproperties (
> type = 'mor',
> primaryKey = 'id',
> preCombineField = 'ts'
> )
> {code}
> 2. insert data
> {code:sql}
> insert into h0 values(1, 'a1', 10, 1000)
> insert into h0 values(2, 'b1', 10, 1000)
> insert into h0 values(3, 'c1', 10, 1000)
> insert into h0 values(4, 'd1', 10, 1000)
> {code}
> 3. update data
> {code:sql}
> update h0 set price = 11 where id = 1
> update h0 set price = 21 where id = 2
> update h0 set price = 31 where id = 3
> update h0 set price = 41 where id = 4
> {code}
> 4. schedule compaction
> {code:sql}
> call run_compaction(table => 'h0', op = 'schedule')
> {code}
> 5. when run sql 'select count(*) from h0', we got 0 but expected 1
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)