Closed
Description
my environment running ArangoDB
I'm using the latest ArangoDB of the respective release series:
- 3.2.8
Mode:
- Single-Server
Storage-Engine:
- mmfiles
On this operating system:
- Windows, version: 10
this is an AQL-related issue:
I'm issuing AQL via:
- web interface with this browser: Chrome 62.0.3202.94 running on this OS: Windows 10
I've run db._explain("<my aql query>")
and it didn't shed more light on this.
The AQL query in question is:
FOR i IN 1..3
INSERT {title: CONCAT("Foo" + i), _key: TO_STRING(i)} INTO test RETURN NEW
The issue can be reproduced using this dataset:
A blank collection "test"
These are the steps to reproduce:
- open the browser on http://127.0.0.1:8529
- log in as root
- use database [x]
_system
- paste query and run
The following problem occurs:
It does not concatenate the title string like "Foo" + number, but instead, it becomes "number" only.
[
{
"_key": "1",
"_id": "test/1",
"_rev": "_W-yM97m---",
"title": "1"
},
{
"_key": "2",
"_id": "test/2",
"_rev": "_W-yM97m--_",
"title": "2"
},
{
"_key": "3",
"_id": "test/3",
"_rev": "_W-yM97m--A",
"title": "3"
}
]
The execution plan looks fine however:
Execution plan:
Id NodeType Est. Comment
1 SingletonNode 1 * ROOT
2 CalculationNode 1 - LET #2 = 1 .. 3 /* range */ /* simple expression */
3 EnumerateListNode 3 - FOR i IN #2 /* list iteration */
4 CalculationNode 3 - LET #4 = { "title" : CONCAT(("Foo" + i)), "_key" : TO_STRING(i) } /* simple expression */
5 InsertNode 3 - INSERT #4 IN test
6 ReturnNode 3 - RETURN $NEW
Indexes used:
none
Optimization rules applied:
Id RuleName
1 remove-data-modification-out-variables
Write query options:
Option Value
ignoreErrors false
waitForSync false
nullMeansRemove false
mergeObjects true
ignoreDocumentNotFound false
readCompleteInput false
useIsRestore false
consultAqlWriteFilter false
4860