From 81fcf277885216b0b2046c4095b5e5a76033a027 Mon Sep 17 00:00:00 2001 From: V_Galaxy Date: Thu, 3 Oct 2024 21:06:03 +0800 Subject: [PATCH] try fix org.apache.hugegraph.api.traverser.EdgeExistenceAPITest#testEdgeExistenceGet --- .../apache/hugegraph/backend/serializer/BinarySerializer.java | 2 ++ .../java/org/apache/hugegraph/backend/tx/GraphTransaction.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinarySerializer.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinarySerializer.java index 677ed165f1..98a44b4d26 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinarySerializer.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/serializer/BinarySerializer.java @@ -730,6 +730,8 @@ private Query writeQueryEdgePrefixCondition(ConditionQuery cq) { if (key == HugeKeys.DIRECTION) { // Direction is null, set to OUT value = Directions.OUT; + } else if (key == HugeKeys.SUB_LABEL) { + value = cq.condition(HugeKeys.LABEL); } else { break; } diff --git a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java index 51c3f859aa..97f7158226 100644 --- a/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java +++ b/hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java @@ -1465,7 +1465,7 @@ private static void verifyEdgesConditionQuery(ConditionQuery query) { for (HugeKeys key : EdgeId.KEYS) { Object value = query.condition(key); if (value == null) { - break; + continue; } matched++; }