-
-
Notifications
You must be signed in to change notification settings - Fork 99
Accessing a result set has unexpected side effects #1652
Copy link
Copy link
Closed
Labels
Milestone
Description
ArcadeDB Version:
24.5.1
OS and JDK Version:
Official Docker image
Expected behavior
Accessing a variable with a result set should be idempotent.
Actual behavior
The result set is modified as a side effect of accessing the variable.
This is the output:
2024-07-11 00:42:43 2024-07-10 22:42:43.520 INFO [ConsoleStatement] <ArcadeDB_0> {SIZE=1}
2024-07-11 00:42:43 2024-07-10 22:42:43.521 INFO [ConsoleStatement] <ArcadeDB_0> {OK=[{"@cat":"v","@type":"Dummy","@rid":"#450:5"}]}
2024-07-11 00:42:43 2024-07-10 22:42:43.521 INFO [ConsoleStatement] <ArcadeDB_0> {FAILS=[]}
2024-07-11 00:42:43 2024-07-10 22:42:43.521 INFO [ConsoleStatement] <ArcadeDB_0> {SIZE=1}
Steps to reproduce
LET $schemaTypes = SELECT FROM schema:types WHERE name='Dummy';
IF ($schemaTypes.size() != 1) {
CREATE VERTEX TYPE Dummy;
}
LET $vertices = CREATE VERTEX Dummy;
CONSOLE.log map('SIZE', $vertices.size());
CONSOLE.log map('OK', $vertices.asJSON());
CONSOLE.log map('FAILS', $vertices.asJSON());
CONSOLE.log map('SIZE', $vertices.size());
CONSOLE.log map('DEBUG', 'END');
Reactions are currently unavailable