exist icon indicating copy to clipboard operation
exist copied to clipboard

Switch map:merge from use-last to use-first as per XQuery spec

Open adamretter opened this issue 4 years ago • 6 comments

Closes #3750

Fixes map:merge in eXist-db so that It implements use-first as the default behaviour for as per the XQuery spec. Before this change eXist-db implemented use-last as the default.

adamretter avatar Feb 18 '21 22:02 adamretter

I do consider the switch from implicit use-last to use-first a breaking change.

line-o avatar Feb 19 '21 00:02 line-o

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?

adamretter avatar Feb 19 '21 09:02 adamretter

Saxon has changed the behaviour of map:merge quite recently 9.7.0.7 -> 9.7.0.8 https://www.saxonica.com/documentation/index.html#!functions/map/merge

line-o avatar Mar 03 '21 16:03 line-o

wait for 6.x

dizzzz avatar Aug 03 '21 20:08 dizzzz

This PR adds more than its title and description give away and only the switch to "use-first" by default is breaking. I would like this PR to be broken up in two parts:

  1. every non-breaking change: support of "reject" and "combine"
  2. the breaking change that switches the default behaviour

Doing this would allow us to merge in the enhancements earlier (prior to exist7) giving users more time to adapt.

line-o avatar Nov 28 '22 14:11 line-o

the only commits that are breaking are

  • 8d7eb001c62badf468a6fe6be4d05efe37283bc6
  • 3884e412ec9f2b5b425090b50de3807f1be0b67b

line-o avatar Nov 28 '22 14:11 line-o

#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.

line-o avatar Nov 28 '22 15:11 line-o