Github user iyerr3 commented on a diff in the pull request:

    https://github.com/apache/incubator-madlib/pull/69#discussion_r86900354
  
    --- Diff: src/ports/postgres/modules/utilities/in_mem_group_control.py_in 
---
    @@ -54,9 +54,19 @@ class BaseState(object):
                        ret_states=None, **kwargs):
             self.update(col_grp_key, col_grp_state, ret_states)
     
    +    def get_last_state_value(self):
    --- End diff --
    
    Can we refactor to make this a boolean output? It looks like it checks if 
the last element is "set" for each group. So something like `and(value[-1] for 
...)` is more appropriate. 
    
    If the group state values are float then having a boolean check might not 
be ideal. An `almostEqual to 0` check is better. Even with an `int` value, I 
prefer to see a `== 0` check to make the intention explicit.
    
    Finally, I would suggest changing the name since, technically, it's not 
"getting" the last state value - I suggest a name along the lines of 
`are_last_state_value_zero`, with a `True` if all are `0` and `False` 
otherwise. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to