Closed gramian closed 4 months ago
So the problem seems to be the projection in the query, as
INSERT INTO dst FROM SELECT FROM src;
works, which is tested [here](INSERT INTO dst FROM SELECT FROM src;).
Fixed!
Works on the example, but also on a large database with query including a filter and an UNWIND! Awesome.
ArcadeDB Version:
ArcadeDB Server v24.5.1-SNAPSHOT (build a6fcd5ffcb052e4d1f009093f3cba680bd56c8ce/1716500652832/main)
OS and JDK Version:
Running on Mac OS X 12.7.4 - OpenJDK 64-Bit Server VM 17.0.11 (Homebrew)
Expected behavior
Records should be copied into the destination from the source query.
Actual behavior
Internal error Cannot invoke "com.arcadedb.database.Document.getRecord()" because the return value of "com.arcadedb.query.sql.executor.Result.toElement()" is null
``` Error on command execution (PostCommandHandler) java.lang.NullPointerException: Cannot invoke "com.arcadedb.database.Document.getRecord()" because the return value of "com.arcadedb.query.sql.executor.Result.toElement()" is null at com.arcadedb.query.sql.executor.CopyDocumentStep$1.next(CopyDocumentStep.java:71) at com.arcadedb.query.sql.executor.RemoveEdgePointersStep$1.next(RemoveEdgePointersStep.java:51) at com.arcadedb.query.sql.executor.SetDocumentStepStep$1.next(SetDocumentStepStep.java:51) at com.arcadedb.query.sql.executor.SaveElementStep$1.next(SaveElementStep.java:53) at com.arcadedb.query.sql.executor.InsertExecutionPlan.executeInternal(InsertExecutionPlan.java:67) at com.arcadedb.query.sql.executor.ScriptLineStep.syncPull(ScriptLineStep.java:47) at com.arcadedb.query.sql.executor.ScriptExecutionPlan.doExecute(ScriptExecutionPlan.java:96) at com.arcadedb.query.sql.executor.ScriptExecutionPlan.fetchNext(ScriptExecutionPlan.java:61) at com.arcadedb.query.sql.parser.LocalResultSet.fetchNext(LocalResultSet.java:44) at com.arcadedb.query.sql.parser.LocalResultSet.The NPE happens here
Steps to reproduce