You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clear() is not working as intended. g is a copy of the group, not the group itself. The tests pass because ctrl is cleared, which tricks the test into thinking that clear has worked because the keys can no longer be found. I also noticed that Clear() does not use newEmptyMetadata() so there is an optimisation to cache an empty meta and then just assign it control. The same optimisation could be applied to the groups by creating a zero group and the applying it to each group.
The text was updated successfully, but these errors were encountered:
@rkerno Thanks for the bug report! I've gone ahead and updated the test and pushed a fix for the Clear() implementation. No optimizations there yet --- I agree that keeping an empty metadata around and using that as the right hand argument in the assignments when we need it would be more efficient. Hopefully I can get back to that soon.
kpango
pushed a commit
to kpango/swiss
that referenced
this issue
Sep 22, 2023
Because groups are using value semantics, the implementation of Clear() was
accidentally clearing a copy of the group instead of the group itself.
Fixesdolthub#20.
Signed-off-by: kpango <kpango@vdaas.org>
userpro
pushed a commit
to userpro/swiss
that referenced
this issue
Nov 8, 2023
Because groups are using value semantics, the implementation of Clear() was
accidentally clearing a copy of the group instead of the group itself.
Fixesdolthub#20.
Clear() is not working as intended. g is a copy of the group, not the group itself. The tests pass because ctrl is cleared, which tricks the test into thinking that clear has worked because the keys can no longer be found. I also noticed that Clear() does not use newEmptyMetadata() so there is an optimisation to cache an empty meta and then just assign it control. The same optimisation could be applied to the groups by creating a zero group and the applying it to each group.
The text was updated successfully, but these errors were encountered: