Repository navigation
(pickDeliver) end_node_id ignored when end_service is omitted - #3178
Sankalp-2711 wants to merge 3 commits into
Conversation
fetch_vehicle checked column_found(info[12]) (end_service) before reading info[15] (end_node_id), so end_node_id was only honored when end_service was also given. Check the end_node_id column instead. Adds a pgTAP regression test.
|
No actionable comments were generated in the recent review. Walkthrough
ChangesEnd-node handling
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk:
|
|
I dont understand the purpose of your PR that only adds a tap test. Regards. |
Changes proposed in this pull request:
pgr_pickDeliver:end_node_idwas ignored when the vehicles query did notalso include
end_service. Infetch_vehicle, the check wascolumn_found(info[12])(end_service) but the value read wasinfo[15](
end_node_id). The check now usesinfo[15].pgtap/pickDeliver/pickDeliver/inner_query.pg.Reproduce (before the fix)
Line graph 1-2-3-4, one order (pickup 2, delivery 3), one vehicle with
start_node_id = 1,end_node_id = 4,end_open,end_close, and noend_service. The route ends at node 1, soend_node_idis ignored:Adding
0 AS end_serviceto the vehicles query makes the route end at node 4:After this change both queries end at node 4.
SQL used
Behavior change
Anyone who passed
end_node_idwithoutend_servicewas silently getting thestart node as the end node. They now get the specified end node.
The test checks that every route ends at the requested node when
end_serviceis omitted. It fails without the fix and passes with it.
@pgRouting/admins
Summary by CodeRabbit