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.
---