Skip to content

ArrayAggregation: Use long to avoid overflow - #5544

Merged
jihoonson merged 2 commits into
apache:masterfrom
niketh:avoid-overflow
Mar 28, 2018
Merged

ArrayAggregation: Use long to avoid overflow#5544
jihoonson merged 2 commits into
apache:masterfrom
niketh:avoid-overflow

Conversation

@niketh

@niketh niketh commented Mar 28, 2018

Copy link
Copy Markdown
Contributor

@jihoonson Nasty bug, overflow error can be easily overlooked. Fix for #5203

@niketh niketh closed this Mar 28, 2018
@niketh niketh reopened this Mar 28, 2018

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.

BufferArrayGrouper.requiredBufferCapacity must also be modified to return a long.

Also, please add a regression test for this.

And thank you for finding the bug!

@niketh
niketh force-pushed the avoid-overflow branch 2 times, most recently from d1e5dc4 to dc3a529 Compare March 28, 2018 16:34

@gianm gianm 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.

LGTM after style fixes.

[ERROR] /home/travis/build/druid-io/druid/processing/src/main/java/io/druid/query/groupby/epinephelinae/BufferArrayGrouper.java:75:15: 'typecast' is not followed by whitespace. [WhitespaceAfter]

@jihoonson

Copy link
Copy Markdown
Contributor

LGTM. @niketh thanks for the fix!

@niketh niketh closed this Mar 28, 2018
@niketh niketh reopened this Mar 28, 2018
@jihoonson
jihoonson merged commit 912adcc into apache:master Mar 28, 2018
gianm pushed a commit to implydata/druid-public that referenced this pull request Apr 9, 2018
* ArrayAggregation: Use long to avoid overflow

* Add Tests
@gianm gianm added this to the 0.12.1 milestone Apr 9, 2018
gianm pushed a commit to gianm/druid that referenced this pull request Apr 9, 2018
* ArrayAggregation: Use long to avoid overflow

* Add Tests
fjy pushed a commit that referenced this pull request Apr 10, 2018
* ArrayAggregation: Use long to avoid overflow

* Add Tests
riovic918data pushed a commit to riovic918data/druid that referenced this pull request Jun 12, 2026
* ArrayAggregation: Use long to avoid overflow

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants