Skip to content

Commit

Permalink
Fix bug: path always is [0]
Browse files Browse the repository at this point in the history
  • Loading branch information
SiberiaWolfP committed Feb 16, 2024
1 parent fd52d46 commit 7708373
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion duckpgq/src/duckpgq/functions/scalar/shortest_path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,10 @@ static void ShortestPathFunction(DataChunk &args, ExpressionState &state,
while (started_searches < args.size()) {
int64_t search_num = started_searches++;
int64_t src_pos = vdata_src.sel->get_index(search_num);
int64_t dst_pos = vdata_dst.sel->get_index(search_num);
if (!vdata_src.validity.RowIsValid(src_pos)) {
result_validity.SetInvalid(search_num);
} else if (src_data[src_pos] == dst_data[src_pos]) {
} else if (src_data[src_pos] == dst_data[dst_pos]) {
unique_ptr<Vector> output =
make_uniq<Vector>(LogicalType::LIST(LogicalType::BIGINT));
ListVector::PushBack(*output, src_data[src_pos]);
Expand Down

0 comments on commit 7708373

Please sign in to comment.