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

delta field on commit/version queries returns incorrect result #2299

Closed
jsimnz opened this issue Feb 9, 2024 · 3 comments · Fixed by #2306
Closed

delta field on commit/version queries returns incorrect result #2299

jsimnz opened this issue Feb 9, 2024 · 3 comments · Fixed by #2306
Assignees
Labels
area/query Related to the query component bug Something isn't working priority/high
Milestone

Comments

@jsimnz
Copy link
Member

jsimnz commented Feb 9, 2024

Describe the problem
When requesting the delta field on either _version object or a commit query will return incorrect values.

To Reproduce

  • Create any schema
  • Create any document with that schema
  • Query the _version field or commit query specifying the delta in the selection set

image

Expected behavior
Return the base64 encode delta payload, instead it just seems to return the string "Data"

Platform
Linux WSL

@jsimnz jsimnz added bug Something isn't working priority/high labels Feb 9, 2024
@jsimnz jsimnz added this to the DefraDB v0.10 milestone Feb 9, 2024
@jsimnz jsimnz added the area/query Related to the query component label Feb 9, 2024
@jsimnz
Copy link
Member Author

jsimnz commented Feb 9, 2024

There is also a huge gap here, specifically for the delta field within the integration suite, but I dont know how deep the gap goes w.r.t the commit/version queries

@fredcarle
Copy link
Collaborator

The bug is at line 349 of planner/commit.go.

@fredcarle fredcarle self-assigned this Feb 12, 2024
@fredcarle
Copy link
Collaborator

We previously removed the delta payload for the composite block since it is already tracked by field level commits and having the delta in the composite would cause issues protecting the field level data. The expected payload for the composite should be nil.

fredcarle added a commit that referenced this issue Feb 12, 2024
## Relevant issue(s)

Resolves #2299

## Description

This PR fixes a regression bug and adds integration tests to ensure that
future changes don't break the expected query results
shahzadlone pushed a commit to shahzadlone/defradb that referenced this issue Feb 23, 2024
## Relevant issue(s)

Resolves sourcenetwork#2299

## Description

This PR fixes a regression bug and adds integration tests to ensure that
future changes don't break the expected query results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/query Related to the query component bug Something isn't working priority/high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants