Arangodb: Error: AQL: missing variable #2 (1) for node #6 (FilterNode) while planning registers

Created on 19 May 2020  路  3Comments  路  Source: arangodb/arangodb

My Environment

  • __ArangoDB Version__: 3.6.3
  • __Storage Engine__: RocksDB
  • __Deployment Mode__: Single Server
  • __Deployment Strategy__: ArangoDB Starter
  • __Configuration__:
  • __Infrastructure__: own
  • __Operating System__: Windows 10
  • __Total RAM in your machine__: 16GB
  • __Disks in use__: HDD
  • __Used Package__:

Component, Query & Data

__Affected feature__:
__AQL query (if applicable)__:

for ent in @@collection
    filter ent.attr == @value
    filter ent.attr == @value
    filter ent.attr == @value
return ent

{ "value0": "abcd", "@collection": "Users" }

__AQL explain (if applicable)__: I can't profile or explain this query.
__Dataset__: collection with 0 or more documents
__Size of your Dataset on disk__: 0
__Replication Factor & Number of Shards (Cluster only)__: n/a

Steps to reproduce

I tried with arangojs and with web interface

  1. Create collection
  2. Use this query
for ent in @@collection
    filter ent.attr == @value
    filter ent.attr == @value
    filter ent.attr == @value
return ent

(if we have odd number > 1 of filter ent.attr == @value, throws error)

__Problem__:
error

Query: AQL: missing variable #2 (1) for node #6 (FilterNode) while planning registers (exception location: C:\vm02-windows\oskar\work\ArangoDB\arangod\Aql\RegisterPlan.cpp:372). Please report this error to arangodb.com (while optimizing plan) (exception location: C:\vm02-windows\oskar\work\ArangoDB\arangod\RestHandler\RestCursorHandler.cpp:298). Please report this error to arangodb.com

__Expected result__:
no error, return results

1 Bug 2 Fixed 3 AQL 3 Optimizer

All 3 comments

Hi @Tnifey,
I reproduced this in 3.7.devel and 3.6.3-1. It does not happen in 3.5.5-1.

The following queries are parsed without errors:

for ent in @@collection
    filter ent.attr == @value
return ent
for ent in @@collection
    filter ent.attr == @value
    filter ent.attr == @value
return ent
for ent in @@collection
    filter ent.attr == @value
    filter ent.attr == @value
    filter ent.attr == @value
    filter ent.attr == @value
return ent
for ent in @@collection
    filter ent.attr_1 == @value
    filter ent.attr_2 == @value
    filter ent.attr_3 == @value
return ent
for ent in @@collection
    filter ent.attr == @value &&
           ent.attr == @value &&
           ent.attr == @value
return ent

The following queries raise errors:

for ent in @@collection
    filter ent.attr == @value
    filter ent.attr == @value
    filter ent.attr == @value
return ent
for ent in @@collection
    filter ent.attr == @value
    filter ent.attr == @value
    filter ent.attr == @value
    filter ent.attr == @value
    filter ent.attr == @value
return ent
for ent in @@collection
    filter @value == ent.attr
    filter @value == ent.attr
    filter @value == ent.attr
return ent
for ent in @@collection
    filter ent.attr == @value_1
    filter ent.attr == @value_2
    filter ent.attr == @value_3
return ent

Hi @Tnifey,

Version 3.6.4, which includes a fix for this issue, has been released.

From the Changelog:

  • Fixed issue #11652: Error: AQL: missing variable #2 (1) for node #6
    (FilterNode) while planning registers.

Please find the latest release in the download section.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

caracal7 picture caracal7  路  3Comments

bthj picture bthj  路  3Comments

jpyzio picture jpyzio  路  3Comments

DeividasJackus picture DeividasJackus  路  4Comments

teamrehab picture teamrehab  路  3Comments