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

[v3.0.0] IN operator and UNIQUE_HASH_INDEX index cause an error #8270

Closed
mehdizarepour opened this issue May 17, 2018 · 2 comments
Closed

[v3.0.0] IN operator and UNIQUE_HASH_INDEX index cause an error #8270

mehdizarepour opened this issue May 17, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@mehdizarepour
Copy link

OrientDB Version: 3.0.0

Java Version: 1.8

OS: Linux

Using IN operator on a property that has UNIQUE_HASH_INDEX index cause an error

Expected/Actual behavior

The following queries should return a few records but first query throws java.lang.UnsupportedOperationException: Cannot evaluate id IN [1, 2] on index User.id error. (I think it's because the id property uses UNIQUE_HASH_INDEX index!) but second query works fine (the key property uses UNIQUE index).

Queries:

  1. select from User where id in [1, 2]

  2. select from User where key in [1, 2]

Steps to reproduce

Run these commands:

/* schema */

create class User extends V;

create property User.id Integer;

create property User.key Integer;



CREATE INDEX User.id ON User (id) UNIQUE_HASH_INDEX;

CREATE INDEX User.key ON User (key) UNIQUE;



/* data */

create vertex User set id = 1, key = 1;

create vertex User set id = 2, key = 2;

create vertex User set id = 3, key = 3;



select from User where id in [1, 2]    /* it cause an error */
@luigidellaquila luigidellaquila self-assigned this May 17, 2018
@luigidellaquila
Copy link
Member

Hi @mehdizarepour

This issue is already fixed in latest snapshot ( https://oss.sonatype.org/content/repositories/snapshots/com/orientechnologies/orientdb-community/3.0.1-SNAPSHOT/ )

Could you please double-check and confirm that is solves the problem?

Thanks

Luigi

@mehdizarepour
Copy link
Author

Hi @luigidellaquila

The problem is solved!

Thanks

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

3 participants