Skip to content

[branch-4.0][fix](parquet) Fix wrong condition #63509#63739

Merged
morningman merged 5 commits into
apache:branch-4.0from
Gabriel39:backport-63509-branch-4.0
May 28, 2026
Merged

[branch-4.0][fix](parquet) Fix wrong condition #63509#63739
morningman merged 5 commits into
apache:branch-4.0from
Gabriel39:backport-63509-branch-4.0

Conversation

@Gabriel39
Copy link
Copy Markdown
Contributor

@Gabriel39 Gabriel39 commented May 27, 2026

What problem does this PR solve?

pick #63509

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

@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?

@github-actions
Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added approved Indicates a PR has been approved by one committer. reviewed labels May 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@Gabriel39 Gabriel39 changed the title Backport 63509 branch 4.0 [fix](parquet) Fix wrong condition #63509 May 28, 2026
@Gabriel39 Gabriel39 changed the title [fix](parquet) Fix wrong condition #63509 [branch-4.0][fix](parquet) Fix wrong condition #63509 May 28, 2026
Gabriel39 added 5 commits May 28, 2026 10:45
Issue Number: close #xxx

Related PR: #xxx

Problem Summary: Parquet byte array decoders still used addition-based bounds checks for malformed length-prefixed data. The plain decoder could overflow _offset + length before rejecting a value, and the dictionary decoder could decode or copy from truncated pages before validating that enough bytes remained for the length prefix and payload. This change validates remaining bytes with subtraction before decoding or advancing offsets, rejects negative dictionary page lengths, and adds unit coverage for truncated prefixes, truncated payloads, and overflow-sized values.

None

- Test: Manual test
    - Ran git diff --check
    - Could not run build-support/clang-format.sh because llvm@16/clang-format is not installed in this environment
    - Could not run BE UT because run-be-ut.sh requires JDK-17, but this environment only has JDK-11
- Behavior changed: No
- Does this need documentation: No
@morningman morningman force-pushed the backport-63509-branch-4.0 branch from da75e1e to 2a468d9 Compare May 28, 2026 02:45
@morningman
Copy link
Copy Markdown
Contributor

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 84.62% (33/39) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.17% (19386/36462)
Line Coverage 36.33% (181079/498491)
Region Coverage 32.93% (140628/427101)
Branch Coverage 33.81% (60889/180067)

@morningman morningman merged commit d59c030 into apache:branch-4.0 May 28, 2026
25 of 29 checks passed
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