-
Notifications
You must be signed in to change notification settings - Fork 419
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
MERGE does not set properties involving variables #1219
Comments
@rafsun42 Assign it to me please |
Kindly assign the project to me. Thanks. |
@rafsun42 kindly assign the task to me |
Please assign me this task. |
Some observations:
Next, let us analyze the Query Plan Trees for
Cannot draw a conclusion @ksheroz What do you think? |
The same query also fails if instead of an array, we have any other datatype. If the setup is changed to
And the query to:
The return value is still |
It seems like that the |
The query also succeeds in these cases -
|
It appears that the merge code (including the expression evaluation) is working correctly with what it is given. It is just that sometimes it gets a NULL value instead of the variable It also appears that the transform logic is working correctly, at least up to the RETURN transform for -
It might be possible the planner is removing the variable I compiled and tested PG11 1.1.0 and this issue exists there as well. |
I traced it through the code and it appears that the variable from the MATCH is not getting to the MERGE when the variable isn't present in the RETURN list. Unless, there isn't a RETURN, then it works. |
I am not very sure but can The comments mention this, and the function is also hit during debugging. It is proving to be difficult to trace this bug because there seems to be no particular variable where I can check whether x is being passed or not, and no way to check what would be an SQL equivalent of the cypher query, specially when the query plan trees look fine. Can anyone suggest a way to track the source of this bug?
|
I "think" the issue might be in It appears that if the variable is not listed in the RETURN clause, it gets set to NULL. Why? I'm not exactly sure, maybe there is an issue with scope. Because, if the same query, that didn't work properly, is used without the RETURN clause, it works fine. I was able to manually set the |
Hi, I am not sure if this is the correct place to ask this question, but this is the only issue under create and merge refactor project. I wanted to ask, for example we have function However, they are in different files. So is it fine if I merge the functions into a single function, create a new file, include it in the project, and reference that function in both files instead? Or should I put them in one of the files and reference from the other one? But in any case, the function will no longer be static. There are more functions from which common functionalities can be extracted and put in a common function in a new file. That is going to decrease the overall size of the files. How should I approach it? |
@CapnSpek Discord would be the right place for this question since this is not related to the reported bug. |
@jrgemignani Thanks for the PR. The issue is resolved. |
Note: This task is ONLY assigned to people in the 'refactor create\merge' project.
Describe the bug
If properties in the MERGE clause is set from a previous variable (i.e.
.. MERGE ( {key: some_variable} ) ..
), that particular key-value pair is not persisted.How are you accessing AGE (Command line, driver, etc.)?
Command line
What data setup do we need to do?
What is the necessary configuration info needed?
N/A
What is the command that caused the error?
Behavior
The
key2: x.arr
pair is not persisted in the output.Output:
Expected behavior
Expected output:
Environment (please complete the following information):
PG15.4
Master branch
Ubuntu 22.04
Additional context
N/A
The text was updated successfully, but these errors were encountered: