Skip to content

branch-4.2: [fix](be) Reject incompatible Arrow arrays without crashing Stream Load #69872 - #69905

Merged
yiguolei merged 1 commit into
branch-4.2from
auto-pick-69872-branch-4.2
Nov 2, 2026
Merged

yiguolei merged 1 commit into
branch-4.2from
auto-pick-69872-branch-4.2

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #69872

…ad (#69872)

### What problem does this PR solve?

Issue Number: close #69858

Related PR: None

Problem Summary:

The shared Arrow BOOLEAN and DECIMAL SerDes dereference unchecked
`dynamic_cast` results. Passing an `Int32Array` to the BOOLEAN reader or
a `StringArray` to the DECIMAL64 reader can therefore terminate the BE
instead of returning a load error. MAP and STRUCT have the same
unchecked input-cast pattern.

Reject incompatible arrays before accessing buffers, decimal metadata,
or values, independently of `enable_arrow_input_validation`. Reject
mismatched STRUCT field counts before indexing children. Add the column
name and source/destination types to V1/V2 Arrow load errors.

The current V2 Stream Load reader already binds supported input types
with safe Arrow casts. Preserve those conversions, including valid
integer-to-BOOLEAN and string-to-DECIMAL inputs, and test the shared
SerDes directly for incompatible arrays.
@github-actions
github-actions Bot requested a review from yiguolei as a code owner October 31, 2026 02:16
@hello-stephen

Copy link
Copy Markdown
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?

@hello-stephen

Copy link
Copy Markdown
Contributor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 82.98% (39/47) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 64.69% (30247/46759)
Line Coverage 49.57% (320195/645931)
Region Coverage 45.37% (258185/569023)
Branch Coverage 47.01% (121901/259329)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 82.98% (39/47) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 66.67% (30274/45412)
Line Coverage 51.41% (329304/640547)
Region Coverage 47.21% (269047/569909)
Branch Coverage 48.67% (126075/259035)

@yiguolei

yiguolei commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

skip buildall

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

PR approved by anyone and no changes requested.

@yiguolei
yiguolei merged commit ced739c into branch-4.2 Nov 2, 2026
37 of 38 checks passed
@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

PR approved by at least one committer and no changes requested.

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

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants