mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
Update test case regression test comment for lp:1196027
This commit is contained in:
parent
e87960d346
commit
73c19f8473
1 changed files with 70 additions and 0 deletions
|
@ -593,3 +593,73 @@ TRUNCATE TABLE graph_base;
|
|||
DROP TABLE graph_base;
|
||||
DROP TABLE graph;
|
||||
|
||||
#-- Reminder - the basic spec is at http://openquery.com/graph/doc
|
||||
#-- Query edges stored in graph engine (latch=NULL)
|
||||
#-- SELECT * FROM foo;
|
||||
#-- Results:
|
||||
#-- vertex id for origin of edge in origid column.
|
||||
#-- vertex id for destination of edge in destid column.
|
||||
#-- weight of edge in weight column.
|
||||
#-- Essentially this returns the values (origid,destid pairs with optional weight) you put in, in this mode OQGRAPH looks very close to a real table. But it also does nothing special, it's just store/retrieve for those columns. The other columns will be returned as NULL.
|
||||
#--
|
||||
#-- Query vertices stored in graph engine (latch=0)
|
||||
#-- SELECT * FROM foo WHERE latch = 0;
|
||||
#-- Results:
|
||||
#-- vertex id in linkid column
|
||||
#--
|
||||
#-- Query out-edges for vertex (latch=0 AND origid=N)
|
||||
#-- SELECT * FROM foo WHERE latch = 0 AND origid = 2;
|
||||
#-- Results:
|
||||
#-- vertex id in linkid column
|
||||
#-- edge weight in weight column
|
||||
#--
|
||||
#-- Query in-edges for vertex (latch=0 AND destid=N)
|
||||
#-- SELECT * FROM foo WHERE latch = 0 AND destid = 6;
|
||||
#-- Results:
|
||||
#-- vertex id in linkid column
|
||||
#-- edge weight in weight column
|
||||
#--
|
||||
#-- Dijkstra's shortest path algorithm (latch=1)
|
||||
#-- Find shortest path:
|
||||
#-- SELECT * FROM foo WHERE latch = 1 AND origid = 1 AND destid = 6;
|
||||
#-- Results:
|
||||
#-- latch, origid, destid are same as input.
|
||||
#-- vertex id of the current step in linkid column.
|
||||
#-- weight of traversed edge in weight column.
|
||||
#-- step counter in seq column, so you can sort and use the result (starting at step 0).
|
||||
#-- Example: SELECT GROUP_CONCAT(linkid ORDER BY seq) ...
|
||||
#--
|
||||
#-- Find reachable vertices:
|
||||
#-- SELECT * FROM foo WHERE latch = 1 AND origid = 1;
|
||||
#-- Results:
|
||||
#-- latch, origid, destid are same as input.
|
||||
#-- vertex id in linkid column.
|
||||
#-- aggregate of weights in weight column.
|
||||
#--
|
||||
#-- Find originating vertices:
|
||||
#-- SELECT * FROM foo WHERE latch = 1 AND destid = 6;
|
||||
#-- Results:
|
||||
#-- latch, origid, destid are same as input.
|
||||
#-- vertex id in linkid column.
|
||||
#-- aggregate of weights in weight column.
|
||||
#--
|
||||
#-- Breadth-first search (latch=2, assumes that each vertex is weight 1)
|
||||
#-- Find shortest path:
|
||||
#-- SELECT * FROM foo WHERE latch = 2 AND origid = 1 AND destid = 6;
|
||||
#-- Results:
|
||||
#-- vertex id in linkid column.
|
||||
#-- weight column = 1 for each hop.
|
||||
#--
|
||||
#-- Find reachable vertices:
|
||||
#-- SELECT * FROM foo WHERE latch = 2 AND origid = 1;
|
||||
#-- Results:
|
||||
#-- vertex id in linkid column.
|
||||
#-- computed number of hops in weight column.
|
||||
#--
|
||||
#-- Find originating vertices:
|
||||
#-- SELECT * FROM foo WHERE latch = 2 AND destid = 6;
|
||||
#-- Results:
|
||||
#-- vertex id in linkid column.
|
||||
#-- computed number of hops in weight column.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue