Skip to content

allow all options in map:merge#2#4621

Merged
adamretter merged 3 commits into
eXist-db:developfrom
line-o:fix/map-merge-2
Nov 30, 2022
Merged

allow all options in map:merge#2#4621
adamretter merged 3 commits into
eXist-db:developfrom
line-o:fix/map-merge-2

Conversation

@line-o

@line-o line-o commented Nov 28, 2022

Copy link
Copy Markdown
Member

@line-o
line-o requested a review from a team November 28, 2022 15:05
@line-o line-o added bug issue confirmed as bug enhancement new features, suggestions, etc. xquery issue is related to xquery implementation labels Nov 28, 2022
alanpaxton and others added 2 commits November 28, 2022 16:14
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.
fixes eXist-db#4620

Check for existence of "duplicates" option first.
Add test to ensure map:merge#2 with empty options behaves as
map:merge#1.
@sonarqubecloud

Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

65.3% 65.3% Coverage
0.0% 0.0% Duplication

@line-o
line-o requested review from adamretter and dizzzz November 29, 2022 15:53
@adamretter

adamretter commented Nov 29, 2022

Copy link
Copy Markdown
Contributor

@alanpaxton As you did the underlying work which is cherry-picked into here - would you mind taking a look and giving us an "Approve"/"Reject"? The goal in this PR is not to break backwards compatibility with 6.x.x. I would add you as a reviewer, but it seems to only let me choose core-team members!

@alanpaxton

Copy link
Copy Markdown
Collaborator

Approve.
Thanks @adamretter, I had a quick look and it seems the existing tests will confirm we haven't changed the current (non-spec) default merge order, so LGTM.

@adamretter
adamretter merged commit a78f84a into eXist-db:develop Nov 30, 2022
@line-o
line-o deleted the fix/map-merge-2 branch March 20, 2023 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug issue confirmed as bug enhancement new features, suggestions, etc. xquery issue is related to xquery implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] map:merge#2 with empty options not spec compliant

5 participants