Comments (5)
Did you oconsider emulating the output format of pg_routing (spatial graph extension to Postgres)? https://docs.pgrouting.org/latest/en/pgr_dijkstra.html The format avoids alternating, thus creating a heterogeneous collection. It is a simple edge list.
from duckpgq-extension.
Hi Tom,
Thanks for the suggestion! What do you mean by that this format avoids alternating?
So far I have been following the SQL/PGQ specification which says the result of the PATH
should be a list of alternating vertexIDs and edgeIDs ([v0, e1, v1, ..., ek, vk]
). However, I do have plans to work on the path-finding functions, and then I'll keep this in mind.
from duckpgq-extension.
-- its Martin :)
What I meant is that you do not need a return table of format
V0... attribs
E0...attribs
V1
E1
...
As each edge is defined bybstart/end vertex.
So
E0
E1
...
You can then join the vertices in... but you need to indicate if the edge is traverse in reverse.
Or, with redundancy, but easier to work with,
E0,v0,v1
E1, v1,v2
E2,v2,v3
Where you may possibly already indicate in this manner which is the direction of the edge traversed...
Hope I understood well what you do. This is if the result is a relation (table), as I would assume. See the pg routing docs.
from duckpgq-extension.
Apologies Martin, that's the last time I'm guessing a first name based on their Github name :)
I sort of see what you mean, but I don't think it'll apply to how the path-finding will look like in our case. Take for example the following query:
MATCH ANY SHORTEST p = (a WHERE a.id=1)-[e]->{0,3}(b WHERE b.id=3)
COLUMNS(a.id, b.id, path_length(p), p)
For the following graph:
vertexid |
1 |
2 |
3 |
edgeid | source | target |
12 | 1 | 2 |
23 | 2 | 3 |
Would return 1 row:
a.id | b.id | path_length | p |
1 | 2 | 2 | [1, 12, 2, 23, 3] |
from duckpgq-extension.
from duckpgq-extension.
Related Issues (20)
- Make graph table name optional
- Merge with v0.10.0
- Implement PathFindingOperator HOT 2
- Incorrect lower & upper bound on element pattern with WHERE and bounded path-finding
- Binder Error when selecting from non-existent relation HOT 1
- Parser Error when selecting from `information_schema` views HOT 1
- Persist PGQ database objects across sessions HOT 1
- Parser extension doesn't work in python environment HOT 1
- Internal exception when creating property graph on non-existing table
- Table does not exist HOT 1
- Slower in python HOT 1
- Improve slow undirected edge patterns HOT 2
- Merge with v0.10.1 HOT 1
- Duplicate table index "1" in debug mode
- Support optional match
- IMPORT/EXPORT Property graph
- Describe property graph
- Fix label not being unique error on windows
- Merge with DuckD v0.10.2 HOT 3
- Merge with DuckDB v0.10.3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from duckpgq-extension.