bitflicker64 commented on code in PR #416:
URL: https://github.com/apache/hugegraph-ai/pull/416#discussion_r4513639088


##########
hugegraph-llm/src/hugegraph_llm/operators/hugegraph_op/commit_to_hugegraph.py:
##########
@@ -102,7 +102,7 @@ def load_into_graph(self, vertices, edges, schema):  # 
pylint: disable=too-many-
             has_problem = False
             # 2. Handle primary-keys mode vertex
             for pk in primary_keys:
-                if not input_properties.get(pk):
+                if input_properties.get(pk) is None:

Review Comment:
   Important: a single-key vertex with `""` as its primary key was skipped 
before and is written now, so every such vertex of a label maps to the same 
server id and their edges all attach to that one vertex. Treat `""` as missing 
too (`value is None or value == ""`), matching `primary_key_id` in 
`hugegraph_llm_sdk/graph_utils.py`, and add a test for it.



-- 
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