Skip to content

Commit

Permalink
fix(analytical): add check direction for triangles (#4049)
Browse files Browse the repository at this point in the history
fixes #3779
siyuan0322 authored Jul 16, 2024
1 parent 5b1b391 commit 1f796c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/graphscope/analytical/app/triangles.py
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@
from graphscope.framework.app import AppAssets
from graphscope.framework.app import not_compatible_for
from graphscope.framework.app import project_to_simple
from graphscope.framework.errors import InvalidArgumentError

__all__ = ["triangles"]

@@ -50,4 +51,8 @@ def triangles(graph):
>>> sess.close()
"""
if graph.is_directed():
raise InvalidArgumentError(
"Triangles does not support be queried upon directed graph."
)
return AppAssets(algo="triangles", context="vertex_data")(graph)

0 comments on commit 1f796c2

Please sign in to comment.