Skip to content

Conversation

@HappenLee
Copy link
Contributor

Proposed changes

Issue Number: cherry pick #38985

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions


#pragma once

#include <glog/logging.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'glog/logging.h' file not found [clang-diagnostic-error]

#include <glog/logging.h>
         ^

std::partial_sort(res.begin(), sort_end, res.end(),
[this](size_t a, size_t b) { return data[a] < data[b]; });
} else {
if (reverse)
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: statement should be inside braces [readability-braces-around-statements]

Suggested change
if (reverse)
if (reverse) {

be/src/vec/columns/column_decimal.h:301:

-             else
+             } else

if (reverse)
pdqsort(res.begin(), res.end(),
[this](size_t a, size_t b) { return data[a] > data[b]; });
else
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: statement should be inside braces [readability-braces-around-statements]

Suggested change
else
else {

be/src/vec/columns/column_decimal.h:303:

-                         [this](size_t a, size_t b) { return data[a] < data[b]; });
+                         [this](size_t a, size_t b) { return data[a] < data[b]; });
+ }

limit = 0;
}
// std::partial_sort need limit << s can get performance benefit
if (limit > (s / 8.0)) limit = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: statement should be inside braces [readability-braces-around-statements]

Suggested change
if (limit > (s / 8.0)) limit = 0;
if (limit > (s / 8.0)) { limit = 0;
}


if (limit >= s) limit = 0;
// std::partial_sort need limit << s can get performance benefit
if (limit > (s / 8.0)) limit = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: statement should be inside braces [readability-braces-around-statements]

Suggested change
if (limit > (s / 8.0)) limit = 0;
if (limit > (s / 8.0)) { limit = 0;
}

@yiguolei
Copy link
Contributor

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.50% (9315/25520)
Line Coverage: 28.01% (76304/272410)
Region Coverage: 26.82% (39185/146121)
Branch Coverage: 23.53% (19893/84552)
Coverage Report: http://coverage.selectdb-in.cc/coverage/e6027cdaaa5672f6648395564bad1fa849023ffd_e6027cdaaa5672f6648395564bad1fa849023ffd/report/index.html

@yiguolei yiguolei merged commit 564d3cd into apache:branch-2.1 Aug 24, 2024
zclllyybb added a commit to zclllyybb/doris that referenced this pull request Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants