Skip to content
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

Inline LINK Batch Variable #7633

Closed
TropicalPenguin opened this issue Aug 9, 2017 · 1 comment
Closed

Inline LINK Batch Variable #7633

TropicalPenguin opened this issue Aug 9, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@TropicalPenguin
Copy link

OrientDB Version: 2.2.25

Java Version: openjdk version "1.8.0_131"

OS: Ubuntu 17.04

Expected behavior

Should be able to set batch variables to RID values. Useful, for example, when substituting a single value into a batch with tokens and conditional logic. E.g. Where /* token */ can be replaced by a RID

/* Do stuff */
LET foo = /* token */
if ($foo is not null) {
    // Do something with $foo
}
/* Do other stuff... */

Actual behavior

com.orientechnologies.orient.core.command.OCommandExecutorNotFoundException: Cannot find a command executor for the command request: sql.#1:0
	DB name="pac"
	at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:54)
	at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:39)
	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3144)
	at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:69)
	at com.orientechnologies.orient.core.command.script.OCommandExecutorScript.executeCommand(OCommandExecutorScript.java:486)
	at com.orientechnologies.orient.core.command.script.OCommandExecutorScript.executeLet(OCommandExecutorScript.java:624)
	at com.orientechnologies.orient.core.command.script.OCommandExecutorScript.executeSQLScript(OCommandExecutorScript.java:276)
	at com.orientechnologies.orient.core.command.script.OCommandExecutorScript.executeSQL(OCommandExecutorScript.java:197)
	at com.orientechnologies.orient.core.command.script.OCommandExecutorScript.executeInContext(OCommandExecutorScript.java:104)
	at com.orientechnologies.orient.core.command.script.OCommandExecutorScript.execute(OCommandExecutorScript.java:88)
	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3208)
	at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3146)
	at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:69)
	at com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostBatch.execute(OServerCommandPostBatch.java:196)
	at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.service(ONetworkProtocolHttpAbstract.java:173)
	at com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract.execute(ONetworkProtocolHttpAbstract.java:625)
	at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)

Steps to reproduce

Executing a simple batch, substituting any RID - valid or not, like this:

BEGIN
LET foo = #1:0
COMMIT

... gives an error.

Whereas LINKLIST works...

BEGIN
LET foo = [#1:0]
COMMIT
@luigidellaquila luigidellaquila self-assigned this Aug 9, 2017
@luigidellaquila
Copy link
Member

Hi @TropicalPenguin

I just fixed this issue on branch 2.2.x, it will be released with 2.2.30.

Leaving open to port the fix to 3.0

Thanks

Luigi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants