Skip to content

branch-4.1: [feature](iceberg) support insert into iceberg table with sort-order (#60540)#61414

Open
zhangstar333 wants to merge 2 commits intoapache:branch-4.1from
zhangstar333:branch-4.1-03-17
Open

branch-4.1: [feature](iceberg) support insert into iceberg table with sort-order (#60540)#61414
zhangstar333 wants to merge 2 commits intoapache:branch-4.1from
zhangstar333:branch-4.1-03-17

Conversation

@zhangstar333
Copy link
Contributor

Problem Summary:
cherry-pick from master (#60540)

…pache#60540)

Problem Summary:

support write iceberg table with sort-order, the write data have been
local sorted, and have add lower/upper_bounds metadata. so the iceberg
plan could use it to prune datafile.
**Notes**: this is only a local sort, not global sort. so if you are
more parallel about iceberg writer, you many see overlapping of
lower/upper_bounds between files.
if you need a global sort, maybe could add order by cluster in the
insert SQL.

you could create table, and then alter table eg:
```
CREATE TABLE test_table2 (
    id INT,
    name STRING,
    score DOUBLE,
    create_time datetime
)
ORDER BY (
    id ASC NULLS FIRST,
    score DESC NULLS LAST)
PROPERTIES (
  'write-format'='ORC'
);
```
@zhangstar333 zhangstar333 requested a review from yiguolei as a code owner March 17, 2026 03:43
@Thearas
Copy link
Contributor

Thearas commented Mar 17, 2026

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@zhangstar333
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.15% (1788/2259)
Line Coverage 64.46% (31960/49580)
Region Coverage 65.30% (15995/24496)
Branch Coverage 55.88% (8512/15234)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 32.61% (15/46) 🎉
Increment coverage report
Complete coverage report

@zhangstar333
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.15% (1788/2259)
Line Coverage 64.44% (31951/49580)
Region Coverage 65.23% (15979/24496)
Branch Coverage 55.86% (8509/15234)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 32.61% (15/46) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 0.29% (2/698) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.81% (19289/36527)
Line Coverage 36.15% (180133/498254)
Region Coverage 32.67% (139380/426622)
Branch Coverage 33.69% (60633/179987)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 0.43% (3/697) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.36% (25519/35761)
Line Coverage 54.12% (269155/497369)
Region Coverage 51.52% (222009/430896)
Branch Coverage 53.01% (95757/180632)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants