I have a generic question. Maybe ping <@U0664J23JM...
# daft-dev
r
I have a generic question. Maybe ping @Colin Ho or @Kevin Wang for visibility. Why are we using the
entry
API here? The way this API reads is that "if min_id does not exist in this map, insert it; but if it does, then _use the already existing value_". Do we want that functionality? Shouldn't we expect that
min_id
does not exist at the time of insertion (and more strongly that we should panic in the case that it somehow does happen to exist)? I was thinking the logic flow should be something more like
assert!(irst_stage_aggs.insert(min_id), "this value should not exist!");
k
could you link the line on github you are referring to?
r
Oh sorry!
k
Yeah, i'm not sure either. If you always insert it, does it break any tests? lol
c
yes u want to reuse it if it exists
e.g. if you do a groupby and then a sum + mean on the same values, you can reuse the same local sum for both aggs
r
Oh?
Interesting..