| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Now, it make sense to me. Please merge this improvement before releasing the new version. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for this @goungoun
Sorry, something went wrong.
|
While checking the examples in the manual, I found a bug and fixed. The named edge pattern (u)<-[e]->(v) should be transformed to (u)-[e1]->(v);(v)-[e2]->(u). (u)-[e]->(v);(v)-[e]->(u) is wrong. |
Sorry, something went wrong.
|
@SemyonSinchenko, I pushed the document changes, 04-motif-finding.md. |
Sorry, something went wrong.
There was a problem hiding this comment.
Nice! Thanks @goungoun
Sorry, something went wrong.
|
Thank you, @SemyonSinchenko. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What changes were proposed in this pull request?
This PR improves the formatting for the variable-length and undirected motif pattern.
The first edge column name for the fixed pattern (u)-[e*1]-(v) and the variable length pattern should be _e1, not e, so that it matches with the other column.
Case 1: undirected pattern
g.find("(u)-[]-(v)").where("u.id == 0").show()
Before:
It took me quite some time to understand why it returns two rows, not three rows. The bidirectional edge returns one with the anonymous edge pattern.
+---------+---------+ | u| v| +---------+---------+ |{0, a, f}|{1, b, m}| |{0, a, f}|{2, c, m}| +---------+---------+After:
It returns three rows with the information, two in edges and one out edge.
+---------+---------+-----------+----------+ | u| v| _pattern|_direction| +---------+---------+-----------+----------+ |{0, a, f}|{1, b, m}|(u)<-[]-(v)| in| |{0, a, f}|{2, c, m}|(u)<-[]-(v)| in| |{0, a, f}|{1, b, m}|(u)-[]->(v)| out| +---------+---------+-----------+----------+Case 2: undirected variable-length pattern
g.find("(v)-[e*1..3]-(u)").where("u.id == 2").show()
Before:
Cannot understand why e column is placed at the end of the data frame, and not easy to understand the result.
+---------+---------------+---------+--------------+---------+--------------+---------+---------------+ | u| _e1| _v1| _e2| _v2| _e3| v| e| +---------+---------------+---------+--------------+---------+--------------+---------+---------------+ |{2, c, m}|{2, 0, unknown}|{0, a, f}|{0, 1, friend}|{1, b, m}|{1, 2, friend}|{2, c, m}| NULL| |{2, c, m}|{2, 0, unknown}|{0, a, f}|{0, 1, friend}|{1, b, m}|{1, 0, follow}|{0, a, f}| NULL| |{2, c, m}|{2, 0, unknown}|{0, a, f}|{0, 1, friend}| NULL| NULL|{1, b, m}| NULL| |{2, c, m}| NULL| NULL| NULL| NULL| NULL|{3, d, f}| {2, 3, follow}| |{2, c, m}| NULL| NULL| NULL| NULL| NULL|{0, a, f}|{2, 0, unknown}| |{2, c, m}| {1, 0, follow}|{0, a, f}|{0, 1, friend}|{1, b, m}|{1, 2, friend}|{1, b, m}| NULL| |{2, c, m}|{2, 0, unknown}|{0, a, f}|{0, 1, friend}|{1, b, m}|{1, 2, friend}|{2, c, m}| NULL| |{2, c, m}| {0, 1, friend}|{1, b, m}|{1, 2, friend}| NULL| NULL|{0, a, f}| NULL| |{2, c, m}| NULL| NULL| NULL| NULL| NULL|{1, b, m}| {1, 2, friend}| +---------+---------------+---------+--------------+---------+--------------+---------+---------------+After:
The informative columns such as _hop, _pattern, _direction is added to help understand the results. It also ordered by _hop, _direction.
+---------+---------------+---------+--------------+---------+--------------+---------+----+--------------+----------+ | u| _e1| _v1| _e2| _v2| _e3| v|_hop| _pattern|_direction| +---------+---------------+---------+--------------+---------+--------------+---------+----+--------------+----------+ |{2, c, m}| {1, 2, friend}| NULL| NULL| NULL| NULL|{1, b, m}| 1|(u)<-[e*1]-(v)| in| |{2, c, m}| {2, 3, follow}| NULL| NULL| NULL| NULL|{3, d, f}| 1|(u)-[e*1]->(v)| out| |{2, c, m}|{2, 0, unknown}| NULL| NULL| NULL| NULL|{0, a, f}| 1|(u)-[e*1]->(v)| out| |{2, c, m}| {0, 1, friend}|{1, b, m}|{1, 2, friend}| NULL| NULL|{0, a, f}| 2|(u)<-[e*2]-(v)| in| |{2, c, m}|{2, 0, unknown}|{0, a, f}|{0, 1, friend}| NULL| NULL|{1, b, m}| 2|(u)-[e*2]->(v)| out| |{2, c, m}| {1, 0, follow}|{0, a, f}|{0, 1, friend}|{1, b, m}|{1, 2, friend}|{1, b, m}| 3|(u)<-[e*3]-(v)| in| |{2, c, m}|{2, 0, unknown}|{0, a, f}|{0, 1, friend}|{1, b, m}|{1, 2, friend}|{2, c, m}| 3|(u)<-[e*3]-(v)| in| |{2, c, m}|{2, 0, unknown}|{0, a, f}|{0, 1, friend}|{1, b, m}|{1, 2, friend}|{2, c, m}| 3|(u)-[e*3]->(v)| out| |{2, c, m}|{2, 0, unknown}|{0, a, f}|{0, 1, friend}|{1, b, m}|{1, 0, follow}|{0, a, f}| 3|(u)-[e*3]->(v)| out| +---------+---------------+---------+--------------+---------+--------------+---------+----+--------------+----------+