madlib-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iyerr3 <...@git.apache.org>
Subject [GitHub] incubator-madlib pull request: Recursive_partitioning: Fix random ...
Date Fri, 25 Mar 2016 21:45:26 GMT
Github user iyerr3 commented on a diff in the pull request:

    https://github.com/apache/incubator-madlib/pull/32#discussion_r57494868
  
    --- Diff: src/ports/postgres/modules/recursive_partitioning/decision_tree.py_in ---
    @@ -669,6 +669,8 @@ def _get_n_and_deplist(training_table_name, dependent_variable, filter_null):
                        source=training_table_name,
                        filter_null=filter_null)
         r = plpy.execute(sql)[0]
    +    if r['n_rows'] is None:
    +        return None, None
    --- End diff --
    
    It's better to return `0` instead of the `None` for `n_rows`. The _assert in the calling
function could be changed to `n_rows > 0`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message