-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HIVE-28590: Iceberg: Add support for FILE_SIZE_THRESHOLD to compactio…
…n command
- Loading branch information
Dmitriy Fingerman
committed
Nov 13, 2024
1 parent
7b3a4be
commit db5c2ad
Showing
20 changed files
with
430 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
iceberg/iceberg-handler/src/test/queries/positive/iceberg_minor_compaction_unpartitioned.q
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
-- SORT_QUERY_RESULTS | ||
-- Mask neededVirtualColumns due to non-strict order | ||
--! qt:replace:/(\s+neededVirtualColumns:\s)(.*)/$1#Masked#/ | ||
-- Mask random uuid | ||
--! qt:replace:/(\s+uuid\s+)\S+(\s*)/$1#Masked#$2/ | ||
-- Mask a random snapshot id | ||
--! qt:replace:/(\s+current-snapshot-id\s+)\S+(\s*)/$1#Masked#/ | ||
-- Mask added file size | ||
--! qt:replace:/(\S\"added-files-size\\\":\\\")(\d+)(\\\")/$1#Masked#$3/ | ||
-- Mask total file size | ||
--! qt:replace:/(\S\"total-files-size\\\":\\\")(\d+)(\\\")/$1#Masked#$3/ | ||
-- Mask current-snapshot-timestamp-ms | ||
--! qt:replace:/(\s+current-snapshot-timestamp-ms\s+)\S+(\s*)/$1#Masked#$2/ | ||
-- Mask the enqueue time which is based on current time | ||
--! qt:replace:/(MINOR\s+succeeded\s+)[a-zA-Z0-9\-\.\s+]+(\s+manual)/$1#Masked#$2/ | ||
-- Mask compaction id as they will be allocated in parallel threads | ||
--! qt:replace:/^[0-9]/#Masked#/ | ||
-- Mask removed file size | ||
--! qt:replace:/(\S\"removed-files-size\\\":\\\")(\d+)(\\\")/$1#Masked#$3/ | ||
-- Mask iceberg version | ||
--! qt:replace:/(\S\"iceberg-version\\\":\\\")(\w+\s\w+\s\d+\.\d+\.\d+\s\(\w+\s\w+\))(\\\")/$1#Masked#$3/ | ||
|
||
set hive.llap.io.enabled=true; | ||
set hive.vectorized.execution.enabled=true; | ||
set hive.optimize.shared.work.merge.ts.schema=true; | ||
|
||
create table ice_orc ( | ||
first_name string, | ||
last_name string | ||
) | ||
stored by iceberg stored as orc | ||
tblproperties ('format-version'='2'); | ||
|
||
insert into ice_orc VALUES ('fn1','ln1'); | ||
insert into ice_orc VALUES ('fn2','ln2'), ('fn3','ln3'); | ||
insert into ice_orc VALUES ('fn4','ln4'), ('fn5','ln5'), ('fn6','ln6'), ('fn7','ln7'); | ||
|
||
select * from ice_orc; | ||
describe formatted ice_orc; | ||
|
||
explain alter table ice_orc COMPACT 'minor' and wait file_size_threshold = '365bytes' pool 'iceberg'; | ||
explain optimize table ice_orc rewrite data file_size_threshold = '365bytes' pool 'iceberg'; | ||
|
||
alter table ice_orc COMPACT 'minor' and wait file_size_threshold = '365bytes' pool 'iceberg'; | ||
|
||
select * from ice_orc; | ||
describe formatted ice_orc; | ||
show compactions; |
Oops, something went wrong.