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

Parse error when using graph_table with source or destination predicates #41

Open
PhilippSalvisberg opened this issue Jul 1, 2024 · 0 comments
Assignees
Labels
23.4 bug Something isn't working

Comments

@PhilippSalvisberg
Copy link
Collaborator

The following example works without parse errors:

select *
  from graph_table (students_graph
          match (p1 is person) -[e is friends]- (p2 is person)
          where p1.name = 'Mary'
          columns (
             e.friendship_id,
             e.meeting_date
          )
       )
 order by friendship_id;

However, parser errors are produced with source/destination predicates as in the next example:

select *
  from graph_table (students_graph
          match (p1 is person) -[e is friends]- (p2 is person)
          where p1.name = 'Mary'
          columns (
             e.friendship_id,
             e.meeting_date,
             case 
                when p1 is source of e then 
                   p1.name 
                else
                   p2.name 
             end as from_person,
             case 
                when p1 is destination of e then
                   p1.name
               else
                   p2.name 
             end as to_person
          )
       )
 order by friendship_id; 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
23.4 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants