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

Improve error element_id #68

Open
Dtenwolde opened this issue Jan 17, 2024 · 4 comments
Open

Improve error element_id #68

Dtenwolde opened this issue Jan 17, 2024 · 4 comments
Labels
bug Something isn't working medium priority

Comments

@Dtenwolde
Copy link
Contributor

The current error when using element_id(o) is:

Catalog Error: Scalar Function with name element_id does not exist!
Did you mean "element_at"?

As the way element_id is implemented is by checking the column list and seeing if there is a function named element_id, matching a named subpath. If the named subpath is not found, this will throw the above error, which is confusing. Change it to a more helpful error message.

@Dtenwolde Dtenwolde added bug Something isn't working medium priority labels Jan 17, 2024
@Dtenwolde
Copy link
Contributor Author

Same goes for vertices(), edges(), and path_length(). Which are currently implemented using list_slice and len(list). Perhaps these should be implemented as new UDFs, though they risk having the same parallelism issue as shortestpath.

@Dtenwolde
Copy link
Contributor Author

Dtenwolde commented Feb 13, 2024

A related issue is in the following test case in shortest_path.test

-FROM GRAPH_TABLE (pg
    MATCH
    p = ANY SHORTEST (a:Person)-[k:knows]->{1,3}(b:Person)
    WHERE a.name = 'Daniel'
    COLUMNS (p, a.name as name, b.name as b_name)
    ) study;

Binder Error: Referenced column "p" not found in FROM clause!

Dtenwolde pushed a commit that referenced this issue Jun 4, 2024
CMake: bump version to exactly 3.5
Copy link

github-actions bot commented Sep 4, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Sep 4, 2024
@Dtenwolde
Copy link
Contributor Author

A cleaner way to implement this is to rename the UDFs shortestpath to element_id, iterativelength to path_length and create UDFs for vertices, edges. Or at least register these functions such that the error above will suggest to use this UDF. The actual implementation will completely rewrite the query of course and might not even trigger the UDF if the path finding operator is introduced. To be continued

@Dtenwolde Dtenwolde removed the stale label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working medium priority
Projects
None yet
Development

No branches or pull requests

1 participant