Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AQL: syntax error #13165

Closed
liuzjccc opened this issue Dec 8, 2020 · 6 comments · May be fixed by Deckhandfirststar01/arangodb#34
Closed

AQL: syntax error #13165

liuzjccc opened this issue Dec 8, 2020 · 6 comments · May be fixed by Deckhandfirststar01/arangodb#34
Labels
1 Question 2 Cannot Reproduce Resolution 3 AQL Query language related

Comments

@liuzjccc
Copy link

liuzjccc commented Dec 8, 2020

My Environment

  • ArangoDB Version: 3.5.0
  • Storage Engine: RocksDB
  • Deployment Mode: Single Server
  • Deployment Strategy: ArangoDB Starter in Docker

Problem:

FOR v, e, p IN 1..1 ANY 'a_core/4630188779146052340' GRAPH 'graph_a_core'
PRUNE v._id == 'a_core/4630188779146052615'
FILTER v._id == 'a_core/4630188779146052615'
RETURN p.vertices

The above AQL cannot be executed.The error is Query: AQL: syntax error, unexpected identifier, expecting { near 'v._id == 'archive_assemble_core/...' at position 2:15 (while parsing)

Expected result:
I hope it can execute.

@Simran-B
Copy link
Contributor

Simran-B commented Dec 8, 2020

The query and error message do not match, there is no archive_assemble_core in your query. Please provide the actual query.

@liuzjccc
Copy link
Author

liuzjccc commented Dec 8, 2020

So sorry, this is my query:

FOR v, e, p IN 1..1 ANY 'archive_assemble_core/4630188779146052340' GRAPH 'graph_assemble_core' 
        PRUNE v._id == 'archive_assemble_core/4630188779146052615'
        FILTER v._id == 'archive_assemble_core/4630188779146052615' 
        FILTER p.edges[*].total ALL >= 1 
        AND p.edges[*].endTime ALL >= '20190128' 
        AND p.edges[*].startTime ALL <='20210628' 
        AND p.edges[*].label ALL == 'PEER' 
RETURN p.vertices

@liuzjccc
Copy link
Author

liuzjccc commented Dec 8, 2020

ArangoDB runs on an arm architecture server

@dothebart
Copy link
Contributor

Hi,
Please note that ARM isn't currently officially supported.
Please retry on recent intel builds before reporting bugs.

@liuzjccc
Copy link
Author

liuzjccc commented Dec 9, 2020

Thank you!
How can I get his support?
Is there any way?

@Simran-B
Copy link
Contributor

Simran-B commented Dec 9, 2020

The query parses fine in a 3.5.0 Docker container on x86_64 hardware:

127.0.0.1:8529@_system> db._explain(`FOR v, e, p IN 1..1 ANY 'archive_assemble_core/4630188779146052340' GRAPH 'graph_assemble_core'
...>         PRUNE v._id == 'archive_assemble_core/4630188779146052615'
...>         FILTER v._id == 'archive_assemble_core/4630188779146052615'
...>         FILTER p.edges[*].total ALL >= 1
...>         AND p.edges[*].endTime ALL >= '20190128'
...>         AND p.edges[*].startTime ALL <='20210628'
...>         AND p.edges[*].label ALL == 'PEER'
...> RETURN p.vertices`)
Query String:
 FOR v, e, p IN 1..1 ANY 'archive_assemble_core/4630188779146052340' GRAPH 'graph_assemble_core'
         PRUNE v._id == 'archive_assemble_core/4630188779146052615'
         FILTER v._id == 'archive_assemble_core/4630188779146052615'
         FILTER p.edges[*].total ALL >= 1
         AND p.edges[*].endTime ALL >= '20190128'
         AND p.edges[*].startTime ALL <='20210628'
         AND p.edges[*].label ALL == 'PEER'
 RETURN p.vertices

Execution plan:
 Id   NodeType          Est.   Comment
  1   SingletonNode        1   * ROOT
  2   TraversalNode        2     - FOR v  /* vertex */, p  /* paths */ IN 1..1  /* min..maxPathDepth */ ANY 'archive_assemble_core/4630188779146052340' /* startnode */  GRAPH 'graph_assemble_core'
  3   CalculationNode      2       - LET #13 = (v.`_id` == "archive_assemble_core/4630188779146052615")   /* simple expression */
  4   FilterNode           2       - FILTER #13
  7   CalculationNode      2       - LET #17 = p.`vertices`   /* attribute expression */
  8   ReturnNode           2       - RETURN #17

Indexes used:
 By   Name   Type   Collection   Unique   Sparse   Selectivity   Fields        Ranges
  2   edge   edge   edge         false    false            n/a   [ `_to` ]     base INBOUND
  2   edge   edge   edge         false    false            n/a   [ `_from` ]   base OUTBOUND

Traversals on graphs:
 Id  Depth  Vertex collections  Edge collections  Options                                  Filter / Prune Conditions


 2   1..1   coll                edge              uniqueVertices: none, uniqueEdges: path  FILTER ((p.`edges`[*].`label` all == "PEER") && (p.`edges`[*].`startTime` all <= "20210628") && (p.`edges`[*].`endTime` all >= "20190128") && (p.`edges`[*].`total` all >= 1))
                                                                                           PRUNE (v.`_id` == "archive_assemble_core/4630188779146052615")



Optimization rules applied:
 Id   RuleName
  1   move-calculations-up
  2   move-filters-up
  3   move-calculations-up-2
  4   move-filters-up-2
  5   optimize-traversals
  6   remove-filter-covered-by-traversal
  7   remove-unnecessary-calculations-2



127.0.0.1:8529@_system> db._query("RETURN VERSION()")
[object ArangoQueryCursor, count: 1, cached: false, hasMore: false]

[
  "3.5.0"
]

Regarding ARM, see the discussion here: arangodb/arangodb-docker#53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 Question 2 Cannot Reproduce Resolution 3 AQL Query language related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants