SYaoJun opened a new pull request, #932:
URL: https://github.com/apache/incubator-graphar/pull/932

   ## What changes were proposed in this pull request?
   
   Introduce a new `AddPropertyColumn` overload in `EdgesBuilder` that accepts 
`unordered_map<pair<IdType, IdType>, any>`, allowing users to set edge 
properties by `(src_id, dst_id)` key mapping.
   
   ## Why are the changes needed?
   
   The existing `AddPropertyColumn` takes a `vector<any>` where `values[i]` 
maps to the i-th edge in insertion order. This is fragile because it depends on 
the internal iteration order of `unordered_map` (not guaranteed by the 
standard) and requires the user to know the exact insertion order of edges.
   
   The new map-based overload allows users to directly specify property values 
by `(src, dst)` pair, which is more intuitive and robust. Edges not present in 
the map simply won't have the property set (written as null).
   
   ## Changes
   
   - **`edges_builder.h`**: Added new `AddPropertyColumn(const std::string&, 
const unordered_map<pair<IdType,IdType>, any>&)` overload
   - **`test_builder.cc`**: Added test case covering 4 edges with 3 mapped 
values and 1 deliberately omitted
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to