Skip to content

Conversation

@EmmyMiao87
Copy link
Contributor

Large bitmap will need use StringVal to allocate large memory, which is large than MAX_INT.
The overflow will cause serialization failure of bitmap.

Fixed #3600

Change-Id: I720b9ea4646188a8e1402630601928b5f16fedb2

Large bitmap will need use StringVal to allocate large memory, which is large than MAX_INT.
The overflow will cause serialization failure of bitmap.

Fixed apache#3600

Change-Id: I720b9ea4646188a8e1402630601928b5f16fedb2
@EmmyMiao87 EmmyMiao87 added area/udf Issues or PRs related to the UDF kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels May 29, 2020

std::vector<uint64_t> bits;
if (!SplitStringAndParse({(const char*)input.ptr, input.len}, ",", &safe_strtou64, &bits)) {
// TODO(hkp): I think StringPiece's len should also be uint64_t
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you explain why not changing this to int64? You can just add comment here

Change-Id: Ie84b2071ee063e174bf019ebf0a95d3c02dc16fb
Change-Id: I3a53ba9c343b32b305c5e2c635b50e549a82fc6e
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman added the approved Indicates a PR has been approved by one committer. label Jun 2, 2020
@EmmyMiao87 EmmyMiao87 merged commit e16873a into apache:master Jun 3, 2020
morningman pushed a commit to morningman/doris that referenced this pull request Jun 4, 2020
* Fix large string val allocation failure

Large bitmap will need use StringVal to allocate large memory, which is large than MAX_INT.
The overflow will cause serialization failure of bitmap.

Fixed apache#3600
@EmmyMiao87 EmmyMiao87 mentioned this pull request Sep 2, 2020
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. area/udf Issues or PRs related to the UDF kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

large bitmap serialization failed because of overflow of size

2 participants