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

SQL Subquery in 3.0.X #8532

Closed
ttamatt opened this issue Sep 13, 2018 · 3 comments
Closed

SQL Subquery in 3.0.X #8532

ttamatt opened this issue Sep 13, 2018 · 3 comments
Assignees

Comments

@ttamatt
Copy link

ttamatt commented Sep 13, 2018

OrientDB Version: 3.0.7

Java Version: 1.8

OS: Centos 6.8

FAILED SQL

SELECT `instanceId` AS `instanceId`,@version AS `@version` 
FROM v_instance_testSearchObjA1365535933 WHERE `instanceId` IN  
( SELECT in('e_instance_testSearchObjA1365535933_left_id_right_id_testSearchObjB1365547061').instanceId AS `_ref_instance_ids` 
FROM v_instance_testSearchObjB1365547061 WHERE `name` = 'Jack' )   SKIP 0 LIMIT 200

SUCCESSFUL SQL

SELECT `instanceId` AS `instanceId`,@version AS `@version` 
FROM v_instance_testSearchObjA1365535933 LET $refs =
( SELECT in('e_instance_testSearchObjA1365535933_left_id_right_id_testSearchObjB1365547061').instanceId AS `_ref_instance_ids` 
FROM v_instance_testSearchObjB1365547061 WHERE `name` = 'lightjiao' ) 
WHERE `instanceId` IN  $refs[0].`_ref_instance_ids`  SKIP 0 LIMIT 200

Expected behavior

METADATA PROPERTIES
@Version instanceId
3 5b9a089240fc8
3 5b9a089243673

Actual behavior

Empty data

After I tried the latest code pushed to 3.0.x, subquery problem works fine when meet some basic situation with index, like two vertexes and an edge, but somehow it doesn't work well in our situation, can you figure out the reason for us please?

Thanks,
Matt

@luigidellaquila
Copy link
Member

Hi @ttamatt

Do you have a chance to replicate the problem on demodb? I'm not sure I have the full picture

Thanks

Luigi

@luigidellaquila
Copy link
Member

Hi @ttamatt

This could be something we already fixed here
#8531

Do you have a chance to test latest snapshot and see if also your case is already fixed?
https://oss.sonatype.org/content/repositories/snapshots/com/orientechnologies/orientdb-community/3.0.8-SNAPSHOT/

Thanks

Luigi

@ttamatt
Copy link
Author

ttamatt commented Oct 15, 2018

It seems works fine now, thanks!

@ttamatt ttamatt closed this as completed Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants