Skip to content

[core] Add option to disable overflow exception in sum/product agg - #9874

Merged
JingsongLi merged 2 commits into
apache:masterfrom
tsreaper:sum-overflow-exception
Sep 17, 2026
Merged

JingsongLi merged 2 commits into
apache:masterfrom
tsreaper:sum-overflow-exception

Conversation

@tsreaper

@tsreaper tsreaper commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Purpose

#7992 & #7906 adds overflow detection in sum/product agg. If the result overflows, it will throw an exception.

However, some users don't care about overflows. This change will break their jobs without a way to recover.

This PR adds an option to disable the overflow exception.

Tests

  • FieldAggregatorTest

return options.get(
key(FIELDS_PREFIX + "." + fieldName + ".sum.fail-on-overflow")
.booleanType()
.defaultValue(true));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe default value should be false?

@tsreaper tsreaper changed the title [core] Add option to disable overflow exception in sum agg [core] Add option to disable overflow exception in sum/product agg Sep 17, 2026

@JingsongLi JingsongLi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the overflow-option update. The default is now false, preserving the previous wrapping behavior unless strict overflow checking is explicitly enabled, and the option is passed through the production aggregation path. No additional blocking issues found.

@JingsongLi
JingsongLi merged commit 6c8c337 into apache:master Sep 17, 2026
15 of 18 checks passed
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.

2 participants