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 FROM (<MATCH query...>) not working? #8430

Closed
hrstoyanov opened this issue Jul 25, 2018 · 3 comments
Closed

SELECT FROM (<MATCH query...>) not working? #8430

hrstoyanov opened this issue Jul 25, 2018 · 3 comments
Assignees
Labels
Milestone

Comments

@hrstoyanov
Copy link

OrientDB Version: 3.0.5-SNAPSHOT

Java Version: 1.8

OS: any

I have a MATCH query that works as expected:

match 
{class: Account, as: a}.outE(WorksFor){where: ('admin' in ROLES)}.inV(Staffer){where: (email='[email protected]')},
{as:a}.outE(WorksFor){where:('admin' in ROLES)} 
return a, count(*) as totalAdmins group by a;

+----+-----+-----------+
|#   |a    |totalAdmins|
+----+-----+-----------+
|0   |#65:0|2          |
|1   |#66:0|1          |
+----+-----+-----------+


However any attempt to wrap it with SELECT :

select from (<the_above_query>) where totalAdmins=1;
select a from (<the_above_query>) where totalAdmins=1;

fails with syntax error???

Error: com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error parsing query:
select from (match {class:Account, as: a}
          ^
Encountered " <FROM> "from "" at line 1, column 8.
Was expecting one of:
    <DISTINCT> ...
    <DISTINCT> ...
    <DISTINCT> ...
    <DISTINCT> ...
    <DISTINCT> ...
    <DISTINCT> ...
    <DISTINCT> ...
    <DISTINCT> ...
    <DISTINCT> ...
@hrstoyanov
Copy link
Author

This appear to be issue with the console only. Studio works as expected!

@luigidellaquila luigidellaquila self-assigned this Jul 30, 2018
luigidellaquila added a commit that referenced this issue Jul 31, 2018
@luigidellaquila
Copy link
Member

Hi @hrstoyanov

I just pushed a fix for this

Thanks

Luigi

@luigidellaquila luigidellaquila added this to the 3.0.5 milestone Jul 31, 2018
@hrstoyanov
Copy link
Author

@luigidellaquila seems fixed, 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

2 participants