Github user orhankislal commented on a diff in the pull request:
https://github.com/apache/madlib/pull/194#discussion_r150943944
--- 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 --
Since the variable can be an expression and not a column, I wanted to avoid
printing the whole expression and making the error message long and confusing.
We can easily add it if you feel that would be more useful.
---