-
Notifications
You must be signed in to change notification settings - Fork 29
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
[rGkwaqu1] apoc.path.expand doesn't handle special characters in label name #415
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review. The solution looks OK, but I think it would be good with better test coverage
@Test | ||
public void testLabelWithSpecialChar() { | ||
db.executeTransactionally( | ||
"CREATE (n:`http://example.com/abc#Object` {one: 'alpha'})-[:REL]->(o:`http://www.w3.org/2002/07/owl#Class`:OwlClass {two: 'beta'})" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would write the test setup slightly different so there are some nodes with e.g. the labels
http
+ //example.com/abc#Object
, only http
or other similar cases that should be filtered out by the label filter. That way it would be easier to notice if there are any bugs around this solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing
073a3ff
to
ce7677d
Compare
CI error fixed here |
…l name (neo4j/apoc#415) * [rGkwaqu1] apoc.path.expand doesn't handle special characters in label name * [rGkwaqu1] added tests
…l name (neo4j/apoc#415) * [rGkwaqu1] apoc.path.expand doesn't handle special characters in label name * [rGkwaqu1] added tests
…l name (neo4j/apoc#415) (#3633) * [rGkwaqu1] apoc.path.expand doesn't handle special characters in label name * [rGkwaqu1] added tests
Unlike what is written in the card,
the issue regards the
:
character, which handle compound labels.In this pr I updated the
:
char so that an escape character\
can be inserted.In case it's ok, the documentation should be updated.
Otherwise, we could just explain better that the
:
charis used to handle multiple labels and that it is not possible to filter labels containing that character.