8000 Error: AQL: missing variable #2 (1) for node #6 (FilterNode) while planning registers · Issue #11652 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

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

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

Closed
Tnifey opened this issue May 19, 2020 · 3 comments
Assignees
Labels
1 Bug 2 Fixed Resolution 3 AQL Query language related 3 Optimizer AQL query optimizer is involved
Milestone

Comments

@Tnifey
Copy link
Tnifey commented May 19, 2020

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

@Simran-B Simran-B added 1 Analyzing 3 AQL Query language related 3 Optimizer AQL query optimizer is involved labels May 20, 2020
@Simran-B Simran-B self-assigned this May 20, 2020
@Simran-B
Copy link
Contributor
Simran-B commented May 20, 2020

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
< 8000 /div>

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

@jsteemann
Copy link
Contributor

Fixed via #11676

8000

KVS85 pushed a commit that referenced this issue May 25, 2020
…FilterNode) while planning registers (#11676)
jsteemann added a commit that referenced this issue May 25, 2020
…FilterNode) while planning registers (#11675)
ObiWahn added a commit that referenced this issue May 26, 2020
…-functions-internal-cache

* 'devel' of github.com:arangodb/arangodb:
  fixed issue #11652: Error: AQL: missing variable #2 (1) for node #6 (FilterNode) while planning registers (#11675)
  Fix typo
  fix for BTS-67 (#11650)
@maxkernbach maxkernbach added this to the 3.6.4 milestone May 28, 2020
@maxkernbach
Copy link
Contributor

Hi @Tnifey,

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

From the Changelog:

Please find the latest release in the download section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 Bug 2 Fixed Resolution 3 AQL Query language related 3 Optimizer AQL query optimizer is involved
Projects
None yet
Development

No branches or pull requests

4 participants
0