Tpt opened a new issue, #18955:
URL: https://github.com/apache/datafusion/issues/18955
### Is your feature request related to a problem or challenge?
SPARQL support nested property paths (i.e. regular expressions in the
graph). For example `(p1 / p2+)+` to state "follow and edge labeled p1 then any
number of edges labeled p2, all of this any number of times".
This can be implemented in DataFusion using nested recursive CTEs like
```sql
WITH RECURSIVE outer_cte AS (
SELECT start, end FROM graph WHERE label = 'p1'
UNION (
WITH RECURSIVE nested_cte AS (
SELECT start, end FROM graph WHERE label = 'p2'
UNION
SELECT nested_cte.start AS start, graph.end AS end FROM
nested_cte, graph WHERE nested_cte.end = graph.start AND graph.label = 'p2'
)
SELECT outer_cte.start AS start, nested_cte.end AS end FROM outer_cte,
nested_cte WHERE outer_cte.end = nested_cte.start
)
) SELECT * FROM outer_cte;
```
where `graph(start, label, end)` is the edge table
Sadly, nested CTEs are not supported in DataFusion yet
### Describe the solution you'd like
Enable nested recursive CTEs. A quick implementation might be to give each
`WorkSet` plan node a name and use this name to allow the `RecursiveQueryExec`
node to pick the correct `WorkSetExec` node to set
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]