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

Neo4j module: remove unnecessary property removal. #2070

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,7 @@ public void doAdd(List<Document> documents) {
var statement = """
UNWIND $rows AS row
MERGE (u:%s {%2$s: row.id})
ON CREATE
SET u += row.properties

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am nitpicking, but please consider modifying line 211 so that the SET statement is right under MERGE

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking back 😄 The set operation is a follow-up operation on the merge and therefore I would prefer to keep it indented for readability.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point :)

ON MATCH
SET u = {}
SET u.%2$s = row.id,
u += row.properties
WITH row, u
CALL db.create.setNodeVectorProperty(u, $embeddingProperty, row[$embeddingProperty])
""".formatted(this.label, this.idProperty);
Expand Down
Loading