Skip to content

OperatorStats overflow fix#24843

Merged
natashasehgal merged 1 commit intoprestodb:masterfrom
natashasehgal:nasehgal-219297009
Apr 2, 2025
Merged

OperatorStats overflow fix#24843
natashasehgal merged 1 commit intoprestodb:masterfrom
natashasehgal:nasehgal-219297009

Conversation

@natashasehgal
Copy link
Contributor

@natashasehgal natashasehgal commented Apr 1, 2025

Description

In OperatorStats, summing long types leads to overflow. Use double type to do calculation.
If final result is larger than Long.MAX_VALUE, return Long.MAX_VALUE.

Motivation and Context

This fix was originally made in March 2024 and accidentally reverted on March 2025
Fix: #22230
Revert of fix:
#24414
#24750

Impact

Test Plan

  • Unit tests

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

== NO RELEASE NOTE ==

@natashasehgal natashasehgal requested a review from a team as a code owner April 1, 2025 18:30
@natashasehgal natashasehgal requested a review from presto-oss April 1, 2025 18:30
@prestodb-ci prestodb-ci added the from:Meta PR from Meta label Apr 1, 2025
@natashasehgal natashasehgal removed the request for review from skyelves April 1, 2025 22:32
Copy link
Contributor

@shangm2 shangm2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this.

@natashasehgal natashasehgal merged commit 9abb67b into prestodb:master Apr 2, 2025
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:Meta PR from Meta

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants