Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](hash)update_hashes_with_value method should handle if input value is null #13332

Merged
merged 2 commits into from
Oct 13, 2022

Conversation

starocean999
Copy link
Contributor

@starocean999 starocean999 commented Oct 12, 2022

Proposed changes

Issue Number: close #xxx

Problem summary

Describe your changes.

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

hashes[i] = HashUtil::xxHash64WithSeed(reinterpret_cast<const char*>(&data[i]),
sizeof(T), hashes[i]);
}
else {
Copy link
Contributor

Choose a reason for hiding this comment

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

here seems do not need compute again ? just do nothing is ok ?

Copy link
Contributor

@yiguolei yiguolei 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 Oct 13, 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.

for (int i = 0; i < s; i++) {
hashes[i] = HashUtil::xxHash64WithSeed(reinterpret_cast<const char*>(&data[i]), sizeof(T),
hashes[i]);
if (null_data) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be better to express the logic as the following to save LOC?

     for (int i = 0; i < s; i++) {
        if (null_data != nullptr && null_data[i] != 0) continue;
        hashes[i] = HashUtil::xxHash64WithSeed(reinterpret_cast<const char*>(&data[i]), sizeof(T),
                                               hashes[i]);
     }

liaoxin01 pushed a commit to liaoxin01/doris that referenced this pull request Nov 4, 2022
…apache#13548 apache#13591) (apache#931)

* update_hashes_with_value method should handle if input value is null apache#13332, fix tpch q75
  https://github.com/apache/doris/pull/13332/files
  commit 8301839
  Author: starocean999 <40539150+starocean999@users.noreply.github.com>
  Date:   Thu Oct 13 14:36:01 2022 +0800

* [Bug](sort) Fix bug in string sorter apache#13548, fix user case
  https://github.com/apache/doris/pull/13548/files
  commit a7c221d
  Author: Gabriel <gabrielleebuaa@gmail.com>
  Date:   Sat Oct 22 21:26:23 2022 +0800

* [Bug](decimal) Fix incorrect result for decimal multiply apache#13591, fix user case
  https://github.com/apache/doris/pull/13591/files
  commit 7fe7c01
  Author: Gabriel <gabrielleebuaa@gmail.com>
  Date:   Tue Oct 25 12:08:49 2022 +0800
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.

5 participants