Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

[NSE-1127] Use larger buffer for hash agg #1129

Merged

Conversation

jackylee-ch
Copy link
Contributor

What changes were proposed in this pull request?

Current hash aggegate use StringHashMap to build hash table, which actually use StringBuilder to storage keys and its size is limited to Int.max-1. We meet the problem with Capacity error: array cannot contain more than 2147483646 bytes, have 2147483708 while using aggeragate, it shows the origin buffer in hash map for hash aggerate is overflowed.
Thus, we use LargeStringHashMap to build hash table, which use LargeBinaryBuilder to storage keys and its size is limited to Long.max-1.

How was this patch tested?

unit tests.

@github-actions
Copy link

#1127

@zhouyuan
Copy link
Collaborator

@jackylee-ch is this a real case? 2147483646 = 2GB

@jackylee-ch
Copy link
Contributor Author

@jackylee-ch is this a real case? 2147483646 = 2GB

Yes

@zhouyuan zhouyuan merged commit 2d24aaf into oap-project:main Oct 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants