Skip to content
This repository has been archived by the owner on Apr 4, 2021. It is now read-only.

Handle Union in opencypher2relalg compilation #9

Closed
5 tasks done
jmarton opened this issue Aug 30, 2016 · 4 comments
Closed
5 tasks done

Handle Union in opencypher2relalg compilation #9

jmarton opened this issue Aug 30, 2016 · 4 comments
Assignees
Labels

Comments

@jmarton
Copy link
Contributor

jmarton commented Aug 30, 2016

  • add Union as BetaOperator to EMF model

  • handle Union in cyp AST -> relalg compilation

  • use different VariableFactories fo each singleQuery (i.e. those that are unioned together)

  • make distinction between UNION ALL/UNION

    match (n:A)
    return n
    union
    match (n:D)
    return n
    
  • add requirement: variable aliases need to be matched (see also: Handle expression aliases for RETURN and WITH clauses #16)
    otherwise exception is thrown in Neo4j, see:

    CREATE (n1:A{name:"World"}) create (n2:B{whatever:"Universe"});
    MATCH (a:A) RETURN a AS a
    UNION
    MATCH (b:B) RETURN b AS a;
    

    Neo4j: All sub queries in an UNION must have the same column names

@jmarton jmarton changed the title Handle Union in opencypher queries Handle Union in opencypher2relalg compilation Aug 30, 2016
jmarton added a commit that referenced this issue Sep 14, 2016
TODO: make distinction between UNION and UNION ALL
@jmarton
Copy link
Contributor Author

jmarton commented Jan 7, 2017

Using different variablefactories for each singleQuery is done in commit 458f942

@szarnyasg
Copy link
Member

This does not work for some reason.

@szarnyasg szarnyasg reopened this Jan 26, 2017
@jmarton
Copy link
Contributor Author

jmarton commented Jan 26, 2017

@szarnyasg please give me a query leading to failing/erroneous compilation.

@szarnyasg
Copy link
Member

Sorry, my mistake - all failing queries only had RETURN clauses (i.e. RETURN ... UNION RETURN ...), which is currently not supported.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants