-
Notifications
You must be signed in to change notification settings - Fork 798
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 clump, add .windows() function for array #3811
Open
Dhghomon
wants to merge
13
commits into
surrealdb:main
Choose a base branch
from
Dhghomon:clump-fix-plus-windows
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 tasks
phughk
previously approved these changes
May 1, 2024
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 thanks! Though one of the tests is failing
thread 'function_array_windows' panicked at lib/tests/function.rs:19:17:
assertion `left == right` failed: Received response did not match expected.
Query response #1,
Desired response: [[0, 1], [1, 2]],
Actual response: [[0, 1], [1, 2], [2, 3]]
left: Array(Array([Array(Array([Number(Int(0)), Number(Int(1))])), Array(Array([Number(Int(1)), Number(Int(2))])), Array(Array([Number(Int(2)), Number(Int(3))]))]))
right: Array(Array([Array(Array([Number(Int(0)), Number(Int(1))])), Array(Array([Number(Int(1)), Number(Int(2))]))]))
…surrealdb into clump-fix-plus-windows
gguillemas
approved these changes
May 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for submitting this pull request! We really appreciate you spending the time to work on these changes.
What is the motivation?
For the first: currently .chunks doesn't check for input of 0 but should. I'm guessing that an empty array would be the way to go but could be changed to return a Result as well. Whatever doesn't simply call .chunks() and pass in a 0 is fine.
Two motivations for the second:
What does this change do?
What is your testing strategy?
Duplicating the existing tests for clumps, as the behaviour is almost exactly the same
Is this related to any issues?
No
Does this change need documentation?
If this pull request requires changes, updates, or improvements to the documentation, then add a corresponding issue on the docs.surrealdb.com repository, and link to it here.
Have you read the Contributing Guidelines?