madlib-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kaknikhil <...@git.apache.org>
Subject [GitHub] madlib pull request #194: Logregr: Add input validation for dep/indep variab...
Date Fri, 10 Nov 2017 22:54:13 GMT
Github user kaknikhil commented on a diff in the pull request:

    https://github.com/apache/madlib/pull/194#discussion_r150355564
  
    --- Diff: src/ports/postgres/modules/regress/logistic.py_in ---
    @@ -158,12 +159,14 @@ def __logregr_validate_args(schema_madlib, tbl_source, tbl_output,
dep_col,
         if not dep_col or dep_col.strip().lower() in ('null', ''):
             plpy.error("Logregr error: Invalid dependent column name!")
     
    -    # if not columns_exist_in_table(tbl_source, [dep_col]):
    -    #     plpy.error("Logregr error: Dependent column does not exist!")
    +    if not is_var_valid(tbl_source, dep_col):
    +        plpy.error("Logregr error: Dependent variable is not valid!")
    --- End diff --
    
    should we print the name of the dependent variable as well and if possible maybe say why
it's not valid i.e column does not exist in the table tbl_source ?
    same for the other is_var_valid calls. 


---

Mime
View raw message