-
-
Notifications
You must be signed in to change notification settings - Fork 189
Switch map:merge from use-last to use-first as per XQuery spec #3738
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
Switch map:merge from use-last to use-first as per XQuery spec #3738
Conversation
|
I do consider the switch from implicit use-last to use-first a breaking change. |
@line-o It's a bugfix, but I agree it is also likely a breaking change for people who have relied on the non-spec compliant behaviour that eXist-db previously implemented... so 6.0.0 then? |
|
Saxon has changed the behaviour of |
b557846 to
3ff7e43
Compare
1a74dd4 to
4af5339
Compare
8970fd8 to
4ca6ec3
Compare
4ca6ec3 to
e60e03f
Compare
e60e03f to
91acbf3
Compare
|
Kudos, SonarCloud Quality Gate passed! |
|
wait for 6.x |
91acbf3 to
2cbc5a9
Compare
|
SonarCloud Quality Gate failed. |
joewiz
left a comment
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.
LGTM
|
This PR adds more than its title and description give away and only the switch to "use-first" by default is breaking.
Doing this would allow us to merge in the enhancements earlier (prior to exist7) giving users more time to adapt. |
|
#4621 now contains the implementation of options "combine" and "reject" (squashed in to one). When it is merged the last three commits here should be removed and this PR rebased on current develop. |
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.
We should take extra care that all existing XQuery code that makes use of map:merge#1 is checked. XQSuite is one example but I found many more instances.
This is to not break existing functionality. We might not have tests for this in place in all bundled extensions and the issues might be hard to trace down later.
line-o
left a comment
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.
This code needs to be rebased as it has conflicts regardless if my proposed approach is accepted. (These conflicts are resolved in #4621 already)
…r the XQuery 3.1 Specification
2cbc5a9 to
a8ca76b
Compare
Reject by counting expected size of merge. Combine uses a merge-with-combine fn from the underlying collection code. Passes an initial set of tests. There’s some code we have written for completeness (MapType merge with combiner operator) which doesn’t seem to get called. Need to investigate/test further.
a8ca76b to
a05df92
Compare
|
Kudos, SonarCloud Quality Gate passed! |












Closes #3750
Fixes
map:mergein eXist-db so that It implementsuse-firstas the default behaviour for as per the XQuery spec. Before this change eXist-db implementeduse-lastas the default.