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

    https://github.com/apache/madlib/pull/179#discussion_r136677915
  
    --- Diff: src/ports/postgres/modules/convex/utils_regularization.py_in ---
    @@ -156,14 +211,21 @@ def __utils_normalize_data_grouping(y_decenter=True, 
**kwargs):
         """
         group_col = kwargs.get('grouping_col')
         group_col_list = split_quoted_delimited_str(group_col)
    -    group_where_x = ' AND 
'.join(['{tbl_data}.{grp}=__x__.{grp}'.format(grp=grp,
    -        **kwargs) for grp in group_col_list])
    -    group_where_y = ' AND 
'.join(['{tbl_data}.{grp}=__y__.{grp}'.format(grp=grp,
    -        **kwargs) for grp in group_col_list])
    +    x_mean_join_clause = ''
    +    y_mean_join_clause = ''
    +    if kwargs.get('x_mean_table'):
    +        group_where_x = ' AND 
'.join(['{tbl_data}.{grp}=__x__.{grp}'.format(grp=grp,
    +            **kwargs) for grp in group_col_list])
    +        x_mean_join_clause = "INNER JOIN {0} AS __x__ ON {1}".format(
    +                                kwargs.get('x_mean_table'), group_where_x)
    +    if kwargs.get('y_mean_table'):
    +        group_where_y = ' AND 
'.join(['{tbl_data}.{grp}=__y__.{grp}'.format(grp=grp,
    --- End diff --
    
    We can use the new `_check_groups` function from utilities.


---

Reply via email to