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

    https://github.com/apache/madlib/pull/268#discussion_r185970102
  
    --- Diff: src/ports/postgres/modules/utilities/validate_args.py_in ---
    @@ -368,8 +375,10 @@ def get_expr_type(expr, tbl):
             SELECT pg_typeof({0}) AS type
             FROM {1}
             LIMIT 1
    -        """.format(expr, tbl))[0]['type']
    -    return expr_type.lower()
    +        """.format(expr, tbl))
    +    if not expr_type:
    +        plpy.error("Table {0} does not contain any valid 
tuples".format(tbl))
    --- End diff --
    
    maybe the error message should also mention that we failed to get the 
expression type of column foo in table bar. what do you think ?


---

Reply via email to