Skip to content

Commit 97b7d48

Browse files
committed
Fix clang-tidy errors
1 parent c70d39e commit 97b7d48

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/aggregates/dp_laplace_noise.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ static bool SmoothMedianStatsRow(const list_entry_t &entry, const UnifiedVectorF
496496
if (valid_count < min_valid) {
497497
return false;
498498
}
499-
std::sort(values.begin(), values.begin() + valid_count);
499+
std::sort(values.begin(), values.begin() + static_cast<vector<double>::difference_type>(valid_count));
500500
for (idx_t j = valid_count; j < values.size(); j++) {
501501
values[j] = values[valid_count - 1];
502502
}

src/table_functions/dp_sass_stability_query.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ namespace duckdb {
1515

1616
namespace {
1717

18-
const vector<string> STABILITY_FIELD_NAMES = {
19-
"lane_count", "valid_count", "null_count", "mean", "stddev_pop", "cv", "min", "median",
20-
"max", "range", "mad", "max_abs_dev", "stable_stddev_1", "stable_mad_1"};
18+
static constexpr idx_t STABILITY_FIELD_COUNT = 14;
2119

2220
struct DpSassStabilityQueryRow {
2321
vector<Value> values;
@@ -258,7 +256,7 @@ static vector<DpSassStabilityQueryRow> ExecuteStabilityQuery(ClientContext &cont
258256
string group_key_json = group_row < group_keys.size() ? group_keys[group_row] : "{}";
259257

260258
vector<Value> values;
261-
values.reserve(4 + STABILITY_FIELD_NAMES.size());
259+
values.reserve(4 + STABILITY_FIELD_COUNT);
262260
values.push_back(Value::BIGINT(static_cast<int64_t>(group_row)));
263261
values.push_back(Value::INTEGER(record.aggregate_index));
264262
idx_t result_name_idx = group_cols + aggregate_index;

0 commit comments

Comments
 (0)