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

Select does not return the proper count of edges on 1.7 #1986

Closed
SafwanHak opened this issue Jan 22, 2014 · 1 comment
Closed

Select does not return the proper count of edges on 1.7 #1986

SafwanHak opened this issue Jan 22, 2014 · 1 comment
Assignees
Labels

Comments

@SafwanHak
Copy link

@Laa, as request by @enisher

Version 1.4.7. Select does not return the proper count of edges when doing "Select from User" returns the following result. My Script to setup this data at end of this message

----+------+----+-------+-----------+----------

|@Rid |name|out_has|out_livesIn|out_speaks

----+------+----+-------+-----------+----------
0 |#11:0 |Luca|[0] |[0] |[0]
1 |#11:-2|Joe |null |null |[0]

----+------+----+-------+-----------+----------

create classes/Vectors

create class User extends V;
create class Language extends V;
create class Label extends V;
create class Email extends V;
create class City extends V;

create Links/Edges

create class has extends E;
create class speaks extends E;
create class is extends E;
create class translatesTo extends E;
create class livesIn extends E;

create User Data

create vertex User set name = 'Luca';
create vertex User set name = 'Joe';

create Language Data

create vertex Language set name = 'En-uk';
create vertex Language set name = 'En-us';
create vertex Language set name = 'Fr-fr';
create vertex Language set name = 'Ru-ru';
create vertex Language set name = 'Ar-sy';

create Label Data

create vertex Label set name = 'Hello';
create vertex Label set name = 'Salut';
create vertex Label set name = 'Ciao';
create vertex Label set name = 'Good day';
create vertex Label set name = 'Bonjour';
create vertex Label set name = 'Hallo';
create vertex Label set name = 'Marhaba';
create vertex Label set name = 'Salut2';

emails

create vertex Email set email = 'Luca@gmail.com';
create vertex Email set email = 'Luca@hotmail.com';

edges for emails

create edge has from (select from User where name = 'Luca') to (select from Email where email = 'Luca@gmail.com');
create edge has from (select from User where name = 'Luca') to (select from Email where email = 'Luca@hotmail.com');

City

create vertex City set name = 'Montreal';
create vertex City set name = 'Toronto';
create vertex City set name = 'New York';
create vertex City set name = 'Roma';

edges for City

create edge livesIn from (select from User where name = 'Luca') to (select from City where name = 'Roma');
create edge livesIn from (select from User where name = 'Luca') to (select from City where name = 'Montreal');

index

create property speaks.out LINK;
create property speaks.in LINK;
CREATE INDEX unique_speaks ON speaks (in, out) UNIQUE;

create property translatesTo.out LINK;

create property translatesTo.in LINK;

CREATE INDEX unique_translatesTo ON translatesTo (in, out) UNIQUE;

create the links between the User->Language

create edge speaks from (select from User where name = 'Luca') to (select from Language where name = 'En-uk');
create edge speaks from (select from User where name = 'Luca') to (select from Language where name = 'En-us');
create edge speaks from (select from User where name = 'Luca') to (select from Language where name = 'Fr-fr');
create edge speaks from (select from User where name = 'Luca') to (select from Language where name = 'Ar-sy');

create edge speaks from (select from User where name = 'Joe') to (select from Language where name = 'En-uk');
create edge speaks from (select from User where name = 'Joe') to (select from Language where name = 'En-us');

create the links between label and language

create edge is from (select from Label where name = 'Hello') to (select from Language where name = 'En-uk');
create edge is from (select from Label where name = 'Hello') to (select from Language where name = 'En-us');
create edge is from (select from Label where name = 'Salut') to (select from Language where name = 'Fr-fr');
create edge is from (select from Label where name = 'Salut2') to (select from Language where name = 'Fr-fr');
create edge is from (select from Label where name = 'Ciao') to (select from Language where name = 'It-it');
create edge is from (select from Label where name = 'Good day') to (select from Language where name = 'En-uk');
create edge is from (select from Label where name = 'Bonjour') to (select from Language where name = 'Fr-fr');
create edge is from (select from Label where name = 'Hallo') to (select from Language where name = 'Ru-ru');
create edge is from (select from Label where name = 'Marhaba') to (select from Language where name = 'Ar-sy');

create the links between labels

create edge translatesTo from (select from Label where name = 'Hello') to (select from Label where name = 'Good day') SET ncount = 3;
create edge translatesTo from (select from Label where name = 'Hello') to (select from Label where name = 'Hallo') SET ncount = 2;
create edge translatesTo from (select from Label where name = 'Hello') to (select from Label where name = 'Salut') SET ncount = 5;
create edge translatesTo from (select from Label where name = 'Hello') to (select from Label where name = 'Salut2') SET ncount = 7;
create edge translatesTo from (select from Label where name = 'Hello') to (select from Label where name = 'Ciao') SET ncount = 10;
create edge translatesTo from (select from Label where name = 'Good day') to (select from Label where name = 'Bonjour');
create edge translatesTo from (select from Label where name = 'Bonjour') to (select from Label where name = 'Marhaba');
create edge translatesTo from (select from Label where name = 'Hallo') to (select from Label where name = 'Marhaba');
create edge translatesTo from (select from Label where name = 'Salut') to (select from Label where name = 'Hallo') SET ncount = 1;
create edge translatesTo from (select from Label where name = 'Salut') to (select from Label where name = 'Salut2') SET ncount = 4;

@lvca lvca removed the bug label Apr 8, 2015
@lvca lvca added the bug label Jan 12, 2016
@luigidellaquila luigidellaquila self-assigned this Mar 9, 2016
@luigidellaquila
Copy link
Member

Fixed long time ago, closing

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

4 participants