Skip to content

Commit

Permalink
Address some compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dentiny committed Dec 16, 2024
1 parent fb38a09 commit ee1ad34
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/core/functions/scalar/local_clustering_coefficient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static void LocalClusteringCoefficientFunction(DataChunk &args,

DuckPGQBitmap neighbors(v_size);

for (int32_t n = 0; n < args.size(); n++) {
for (idx_t n = 0; n < args.size(); n++) {
auto src_sel = vdata_src.sel->get_index(n);
if (!vdata_src.validity.RowIsValid(src_sel)) {
result_validity.SetInvalid(n);
Expand All @@ -54,15 +54,15 @@ static void LocalClusteringCoefficientFunction(DataChunk &args,
continue;
}
neighbors.reset();
for (size_t offset = v[src_node]; offset < v[src_node + 1]; offset++) {
for (int64_t offset = v[src_node]; offset < v[src_node + 1]; offset++) {
neighbors.set(e[offset]);
}

// Count connections between neighbors
int64_t count = 0;
for (size_t offset = v[src_node]; offset < v[src_node + 1]; offset++) {
for (int64_t offset = v[src_node]; offset < v[src_node + 1]; offset++) {
int64_t neighbor = e[offset];
for (size_t offset2 = v[neighbor]; offset2 < v[neighbor + 1]; offset2++) {
for (int64_t offset2 = v[neighbor]; offset2 < v[neighbor + 1]; offset2++) {
int is_connected = neighbors.test(e[offset2]);
count += is_connected; // Add 1 if connected, 0 otherwise
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/functions/scalar/weakly_connected_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static void WeaklyConnectedComponentFunction(DataChunk &args,
idx_t started_searches = 0;
while (started_searches < args.size()) {
// empty visit vectors
for (auto i = 0; i < v_size; i++) {
for (size_t i = 0; i < v_size; i++) {
seen[i] = 0;
visit1[i] = 0;
}
Expand Down Expand Up @@ -146,7 +146,7 @@ static void WeaklyConnectedComponentFunction(DataChunk &args,
continue;
}
// Update component IDs
for (int64_t i = 0; i < v_size; i++) {
for (size_t i = 0; i < v_size; i++) {
if (seen[i][lane]) {
UpdateComponentId(i, src_data[search_num], info);
}
Expand Down
1 change: 0 additions & 1 deletion src/core/parser/duckpgq_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ namespace core {

ParserExtensionParseResult duckpgq_parse(ParserExtensionInfo *info,
const std::string &query) {
auto parse_info = (DuckPGQParserExtensionInfo &)(info);
Parser parser;
parser.ParseQuery((query[0] == '-') ? query.substr(1, query.length())
: query);
Expand Down

0 comments on commit ee1ad34

Please sign in to comment.