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

fix: Change core.DocumentMapping to pointer #1528

Merged

Conversation

fredcarle
Copy link
Collaborator

@fredcarle fredcarle commented May 24, 2023

Relevant issue(s)

Resolves #1526

Description

This PR converts core.DocumentMapping in mapper.Select and mapper.Aggregate to a pointer. It also adds an integration test for the two level deep filter.

It also includes a fix of the change detector for when there are no other actions after SchemaUpdate, CreateDoc and UpdateDoc.

Note: The pointer fix was found by @jsimnz.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...

How has this been tested?

make test

Specify the platform(s) on which this was tested:

  • MacOS

@fredcarle fredcarle added bug Something isn't working area/mapper Related to the mapper components labels May 24, 2023
@fredcarle fredcarle added this to the DefraDB v0.6 milestone May 24, 2023
@fredcarle fredcarle requested a review from a team May 24, 2023 17:11
@fredcarle fredcarle self-assigned this May 24, 2023
@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Merging #1528 (60aa6fe) into develop (b24d5b4) will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1528      +/-   ##
===========================================
+ Coverage    72.01%   72.12%   +0.10%     
===========================================
  Files          185      185              
  Lines        18295    18295              
===========================================
+ Hits         13175    13195      +20     
+ Misses        4072     4058      -14     
+ Partials      1048     1042       -6     
Impacted Files Coverage Δ
planner/mapper/aggregate.go 0.00% <ø> (ø)
planner/mapper/select.go 37.50% <ø> (ø)
planner/average.go 84.61% <100.00%> (ø)
planner/commit.go 78.08% <100.00%> (ø)
planner/count.go 94.59% <100.00%> (ø)
planner/create.go 67.70% <100.00%> (ø)
planner/delete.go 73.61% <100.00%> (ø)
planner/group.go 87.31% <100.00%> (ø)
planner/limit.go 94.73% <100.00%> (ø)
planner/mapper/mapper.go 86.31% <100.00%> (ø)
... and 6 more

... and 3 files with indirect coverage changes

Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

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

LGTM praise for this find

question: Why did change detector need to be part of this PR? is there a correlation between the pointer fix and change detector?

@fredcarle
Copy link
Collaborator Author

question: Why did change detector need to be part of this PR? is there a correlation between the pointer fix and change detector?

I could of done a separate PR for it but it was such a small change and this PR wasn't passing the change detector check without it. Two birds one stone.

@fredcarle fredcarle merged commit 20e9286 into sourcenetwork:develop May 25, 2023
10 checks passed
@fredcarle fredcarle deleted the fredcarle/fix/documentMapper-pointer branch May 25, 2023 02:41
fredcarle added a commit that referenced this pull request May 25, 2023
## Relevant issue(s)

Resolves #1530 

## Description

This PR fixes the previous fix and adds a breaking change document to
prevent the broken cycle in the change detector after the fix. Should
have been part of the #1528 although the change detector was passing
before merge.
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
## Relevant issue(s)

Resolves sourcenetwork#1526 

## Description

This PR converts `core.DocumentMapping` in `mapper.Select` and
`mapper.Aggregate` to a pointer. It also adds an integration test for
the two level deep filter.

It also includes a fix of the change detector for when there are no
other actions after SchemaUpdate, CreateDoc and UpdateDoc.

*Note: The pointer fix was found by @jsimnz.*
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
## Relevant issue(s)

Resolves sourcenetwork#1530 

## Description

This PR fixes the previous fix and adds a breaking change document to
prevent the broken cycle in the change detector after the fix. Should
have been part of the sourcenetwork#1528 although the change detector was passing
before merge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mapper Related to the mapper components bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

core.DocumentMapping in mapper.Select should be a pointer
2 participants