Skip to content

Conversation

@cambyzju
Copy link
Contributor

@cambyzju cambyzju commented Sep 30, 2022

Proposed changes

Issue Number: close #xxx

Problem summary

As mentioned in #13074, there will be some problem in ColumnVector<int>::insert_many_in_copy_way.

Column::insert_xxx functions will append some data, they should reserve or resize before append data.

Checklist(Required)

  1. Does it affect the original behavior:
    • Yes
    • No
    • I don't know
  2. Has unit tests been added:
    • Yes
    • No
    • No Need
  3. Has document been added or modified:
    • Yes
    • No
    • No Need
  4. Does it need to update dependencies:
    • Yes
    • No
  5. Are there any changes that cannot be rolled back:
    • Yes (If Yes, please explain WHY)
    • No

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

Copy link
Member

@xy720 xy720 left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Sep 30, 2022
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

T* res_val_ptr = (T*)data.get_end_ptr();
memcpy(res_val_ptr, data_ptr, num * sizeof(T));
res_val_ptr += num;
data.set_end_ptr(res_val_ptr);
Copy link
Contributor

Choose a reason for hiding this comment

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

If not change end ptr, then the podarray's data size is not changed? Is it wrong?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

data.resize(old_size + num); will alloc memory and change end ptr.

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/vectorization reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants