This is an automated email from the ASF dual-hosted git repository.

jin pushed a commit to branch olap-algo
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git

commit 7bbb8a865880498c7f58c2c0355bcd3ce2c20ec1
Author: Jermy Li <[email protected]>
AuthorDate: Tue Feb 2 18:12:35 2021 +0800

    fix lpa not exist c_label property when a request pass source_label (#78)
    
    Change-Id: Ib2a9766e29708fa4fcbaec152f5c9e571c96a0a6
---
 .../main/java/com/baidu/hugegraph/job/algorithm/comm/LpaAlgorithm.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/comm/LpaAlgorithm.java
 
b/hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/comm/LpaAlgorithm.java
index 973e93f7b..f25201bea 100644
--- 
a/hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/comm/LpaAlgorithm.java
+++ 
b/hugegraph-core/src/main/java/com/baidu/hugegraph/job/algorithm/comm/LpaAlgorithm.java
@@ -29,6 +29,7 @@ import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.commons.lang3.mutable.MutableInt;
 import org.apache.tinkerpop.gremlin.process.traversal.Scope;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 
 import com.baidu.hugegraph.backend.id.Id;
@@ -118,6 +119,7 @@ public class LpaAlgorithm extends AbstractCommAlgorithm {
             }
 
             Number communities = tryNext(this.graph().traversal().V()
+                                             .filter(__.properties(C_LABEL))
                                              .groupCount().by(C_LABEL)
                                              .count(Scope.local));
             return ImmutableMap.of("iteration_times", times,

Reply via email to