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

sortNode.ordering is populated by empty elements #589

Closed
shahzadlone opened this issue Jul 5, 2022 · 0 comments · Fixed by #618
Closed

sortNode.ordering is populated by empty elements #589

shahzadlone opened this issue Jul 5, 2022 · 0 comments · Fixed by #618
Assignees
Labels
bug Something isn't working code quality Related to improving code quality
Milestone

Comments

@shahzadlone
Copy link
Member

Discovered as part of #558.

Inside func (n *sortNode) Explain() (map[string]interface{}, error) function in sort.go file, we have to skip over n.ordering's empty elements using the IsEmpty() method.

Investigate why ordering is populated by the empties, and remove the use of IsEmpty().

@shahzadlone shahzadlone added bug Something isn't working code quality Related to improving code quality labels Jul 5, 2022
@shahzadlone shahzadlone added this to the DefraDB v0.3 milestone Jul 5, 2022
@jsimnz jsimnz modified the milestones: DefraDB v0.3, DefraDB v0.3.1 Jul 5, 2022
@shahzadlone shahzadlone self-assigned this Jul 11, 2022
shahzadlone added a commit that referenced this issue Jul 12, 2022
- Resolves: #589 

- Description: Hunch mentioned in last week's meeting was correct, it was indeed a `make` where it would populate the array with empties and then append being called on top of it. Also removed the function `IsEmpty()`, we used to check for empty elements previously which was introduced in #481.
shahzadlone added a commit to shahzadlone/defradb that referenced this issue Feb 23, 2024
- Resolves: sourcenetwork#589 

- Description: Hunch mentioned in last week's meeting was correct, it was indeed a `make` where it would populate the array with empties and then append being called on top of it. Also removed the function `IsEmpty()`, we used to check for empty elements previously which was introduced in sourcenetwork#481.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code quality Related to improving code quality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants