-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-26734: Iceberg: Add an option to allow positional delete files without actual row data. #3758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
964634e
HIVE-26734: Iceberg: Add an option to allow positional delete files w…
ayushtkn ddf8f50
Fix Test File Output Location.
ayushtkn 228bc5b
Regen test file.
ayushtkn d5e0099
Address Review Comments.
ayushtkn c18f995
Address Review Comments.
ayushtkn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
83 changes: 83 additions & 0 deletions
83
iceberg/iceberg-handler/src/test/queries/positive/iceberg_v2_deletes.q
This file contains hidden or 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,83 @@ | ||
| -- Mask random uuid | ||
| --! qt:replace:/(\s+'uuid'=')\S+('\s*)/$1#Masked#$2/ | ||
|
|
||
| -- create an unpartitioned table with skip delete data set to false | ||
| create table ice01 (id int) Stored by Iceberg stored as ORC | ||
| TBLPROPERTIES('format-version'='2', 'iceberg.delete.skiprowdata'='false'); | ||
|
|
||
| -- check the property value | ||
| show create table ice01; | ||
|
|
||
| -- insert some values | ||
| insert into ice01 values (1),(2),(3),(4); | ||
|
|
||
| -- check the inserted values | ||
| select * from ice01; | ||
|
|
||
| -- delete some values | ||
| delete from ice01 where id>2; | ||
|
|
||
| -- check the values, the delete value should be there | ||
| select * from ice01 order by id; | ||
|
|
||
| -- insert some more data | ||
| insert into ice01 values (5),(6),(7),(8); | ||
|
|
||
| -- check the values, only the delete value shouldn't be there | ||
| select * from ice01 order by id; | ||
|
|
||
| -- delete one value | ||
| delete from ice01 where id=7; | ||
|
|
||
| -- change to skip the row data now | ||
| Alter table ice01 set TBLPROPERTIES('iceberg.delete.skiprowdata'='true'); | ||
|
|
||
| -- check the property value | ||
| show create table ice01; | ||
|
|
||
| -- delete some more rows now | ||
| delete from ice01 where id=5; | ||
|
|
||
| -- check the entries, the deleted entries shouldn't be there. | ||
| select * from ice01 order by id; | ||
|
|
||
| -- create a partitioned table with skip row data set to false | ||
| create table icepart01 (id int) partitioned by (part int) Stored by Iceberg stored as ORC | ||
| TBLPROPERTIES('format-version'='2', 'iceberg.delete.skiprowdata'='false'); | ||
|
|
||
| -- insert some values | ||
| insert into icepart01 values (1,1),(2,1),(3,2),(4,2); | ||
|
|
||
| -- check the inserted values | ||
| select * from icepart01 order by id;; | ||
|
|
||
| -- delete some values | ||
| delete from icepart01 where id>=2 AND id<4; | ||
|
|
||
| -- check the values, the delete value should be there | ||
| select * from icepart01; | ||
|
|
||
| -- insert some more data | ||
| insert into icepart01 values (5,1),(6,2),(7,1),(8,2); | ||
|
|
||
| -- check the values, only the delete value shouldn't be there | ||
| select * from icepart01 order by id; | ||
|
|
||
| -- delete one value | ||
| delete from icepart01 where id=7; | ||
|
|
||
| -- change to skip the row data now | ||
| Alter table icepart01 set TBLPROPERTIES('iceberg.delete.skiprowdata'='true'); | ||
|
|
||
| -- check the property value | ||
| show create table icepart01; | ||
|
|
||
| -- delete some more rows now | ||
| delete from icepart01 where id=5; | ||
|
|
||
| -- check the entries, the deleted entries shouldn't be there. | ||
| select * from icepart01 order by id;; | ||
|
|
||
| -- clean up | ||
| drop table ice01; | ||
| drop table icepart01; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.