From 77083739bc0beee1da98d60ca098000ddd04d452 Mon Sep 17 00:00:00 2001 From: SiberiaWolfP Date: Fri, 16 Feb 2024 14:35:20 +0100 Subject: [PATCH] Fix bug: path always is [0] --- duckpgq/src/duckpgq/functions/scalar/shortest_path.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/duckpgq/src/duckpgq/functions/scalar/shortest_path.cpp b/duckpgq/src/duckpgq/functions/scalar/shortest_path.cpp index d02af0e5..0585e96b 100644 --- a/duckpgq/src/duckpgq/functions/scalar/shortest_path.cpp +++ b/duckpgq/src/duckpgq/functions/scalar/shortest_path.cpp @@ -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 output = make_uniq(LogicalType::LIST(LogicalType::BIGINT)); ListVector::PushBack(*output, src_data[src_pos]);