microsoft / Kusto-Query-Language

Kusto Query Language is a simple and productive language for querying Big Data.
Apache License 2.0
510 stars 97 forks source link

Consecutive graph-match operations query time error #132

Closed puijjar closed 1 month ago

puijjar commented 7 months ago

A query time error is received when performing consecutive graph-match operations.

Here's a very artificial example, where everything works fine until make-graph/graph-match after the union:

let nodes = datatable(id: int) [1, 2, 3];
let chain1 = datatable(source: int, destination: int) [1, 2]
    | make-graph source --> destination with nodes on id
    | graph-match (a)-[rel]->(b)
        project Head = a.id, Tail = b.id;
let chain2 = datatable(source: int, destination: int) [2, 3]
    | make-graph source --> destination with nodes on id
    | graph-match (a)-[rel]->(b)
        project Head = a.id, Tail = b.id;
union chain1, chain2
| make-graph Head --> Tail with nodes on id
| graph-match (a)-[rel*2..2]->(b)
    project Head = a.id, Tail = b.id

One would expect result:

Head Tail
1 3

ADX returns an error message starting with:

InternalServiceError (520-UnknownError): {
    "error": {
        "code": "Internal service error",
        "message": "Request aborted due to an internal service error.",
        "@type": "System.InvalidOperationException",
        "@message": "Sequence contains more than one matching element

I could not find documentation about this limitation. This prevents me from doing something absolutely stupid and awesome.

mattwar commented 1 month ago

You should submit an azure support ticket for this.