Skip to content

Conversation

@kaka11chen
Copy link
Contributor

@kaka11chen kaka11chen commented Dec 22, 2025

What problem does this PR solve?

Problem Summary:

Release note

Cherry-pick #57204 #58719

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@kaka11chen kaka11chen requested a review from yiguolei as a code owner December 22, 2025 07:10
@hello-stephen
Copy link
Contributor

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?

@kaka11chen kaka11chen force-pushed the cherry-pick-57204_4.0 branch from ec16ea5 to 0acc3aa Compare December 22, 2025 07:58
@kaka11chen
Copy link
Contributor Author

run buildall

@kaka11chen kaka11chen marked this pull request as draft December 22, 2025 08:00
@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 82.14% (1573/1915)
Line Coverage 67.16% (28070/41794)
Region Coverage 67.68% (13806/20399)
Branch Coverage 58.13% (7363/12666)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 61.68% (850/1378) 🎉
Increment coverage report
Complete coverage report

@kaka11chen kaka11chen force-pushed the cherry-pick-57204_4.0 branch from 0acc3aa to 364e09f Compare December 22, 2025 09:55
@kaka11chen
Copy link
Contributor Author

run buildall

@kaka11chen kaka11chen force-pushed the cherry-pick-57204_4.0 branch from 364e09f to b6db778 Compare December 22, 2025 10:08
@kaka11chen
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 82.14% (1573/1915)
Line Coverage 67.16% (28067/41794)
Region Coverage 67.68% (13807/20399)
Branch Coverage 58.14% (7364/12666)

@kaka11chen kaka11chen force-pushed the cherry-pick-57204_4.0 branch from b6db778 to b8cb3da Compare December 22, 2025 14:40
@kaka11chen
Copy link
Contributor Author

run buildall

@kaka11chen kaka11chen force-pushed the cherry-pick-57204_4.0 branch from b8cb3da to e270345 Compare December 22, 2025 14:46
@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 82.14% (1573/1915)
Line Coverage 67.17% (28071/41794)
Region Coverage 67.72% (13815/20399)
Branch Coverage 58.15% (7365/12666)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 61.68% (850/1378) 🎉
Increment coverage report
Complete coverage report

@kaka11chen kaka11chen force-pushed the cherry-pick-57204_4.0 branch from e270345 to bd4d163 Compare December 22, 2025 17:10
@kaka11chen
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 82.14% (1573/1915)
Line Coverage 67.16% (28070/41794)
Region Coverage 67.66% (13802/20399)
Branch Coverage 58.09% (7358/12666)

…uning (apache#57204)

Problem Summary:

Optimize Complex Type Column Reading with Column Pruning

This PR implements column pruning for complex types (Struct, Array, Map)
to optimize read performance. Previously, Doris would read entire
complex type fields before processing, which was simple to implement but
inefficient when only specific sub-columns were needed.

**Key changes:**
- **FE (Frontend)**: Added column access path calculation and type
pruning
  - Collects and analyzes access paths for complex type fields
  - Performs type pruning based on access paths
  - Implements projection pushdown for complex types

- **BE (Backend)**: Added selective column reading
  - Uses columnAccessPath array from FE to identify required sub-columns
  - Implements selective reading to skip unnecessary sub-columns

**Performance Improvement**: When a struct contains hundreds or
thousands of columns but the query only accesses a few sub-columns, this
optimization can significantly reduce I/O and improve query performance.
For example, with `struct<int a, int b> s`, when only `s.a` is
referenced, we can avoid reading `s.b` entirely.

**Technical Benefits**: Reduces unnecessary data scanning and decoding
overhead for complex types, aligning with Doris's continuous performance
optimization goals .

- **Lazy Materialization for Complex Type Sub-columns**: Defer
materialization of unused sub-columns
- **Predicate Pushdown for Complex Type Sub-columns**: Push predicates
to storage layer for better filtering
- **Parquet RL/DL Optimization**: Read only repetition levels and
definition levels without data in appropriate scenarios
- **Array Size Optimization**: Read only offset and null values for
`array_size()` operations
- **Null Check Optimization**: Read only offset and null values for `!=
null` checks

Co-authored-by: 924060929 <lanhuajian@selectdb.com>
Co-authored-by: Jerry Hu <mrhhsg@gmail.com>
@kaka11chen kaka11chen force-pushed the cherry-pick-57204_4.0 branch from bd4d163 to f4e84e7 Compare December 23, 2025 03:54
@kaka11chen
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 82.14% (1573/1915)
Line Coverage 67.19% (28080/41794)
Region Coverage 67.75% (13821/20399)
Branch Coverage 58.17% (7368/12666)

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 64.37% (1104/1715) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.34% (18605/34877)
Line Coverage 39.12% (172357/440602)
Region Coverage 33.76% (133050/394105)
Branch Coverage 34.78% (57595/165579)

@kaka11chen kaka11chen closed this Dec 24, 2025
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.

3 participants