kbase / relation_engine

Repository containing the KBase Relation Engine API, specs, and other related files.
MIT License
3 stars 11 forks source link

query_prefix is broken #44

Closed jayrbolton closed 4 years ago

jayrbolton commented 4 years ago

We're finding that all queries that use a query_prefix parameter set to "WITH collection" are now returning an AQL syntax error:

{
  "error": {
    "arango_message": "AQL: syntax error, unexpected IN keyword near 'in GO_terms\n  FILTER t.id == @id...' at position 1:20 (while parsing)",
    "message": "ArangoDB server error."
  }
}

cc @ialarmedalien

jayrbolton commented 4 years ago

Shane found the issue. The _preprocess_stored_query function is concatenating the parts of the query without any whitespace separation, so we are executing queries like this:

WITH collecitonFOR x in blah...

PR coming in a minute