madlib-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iyerr3 <...@git.apache.org>
Subject [GitHub] madlib pull request #288: Jira:1239: Converts features from multiple columns...
Date Wed, 04 Jul 2018 00:38:46 GMT
Github user iyerr3 commented on a diff in the pull request:

    https://github.com/apache/madlib/pull/288#discussion_r199981970
  
    --- Diff: src/ports/postgres/modules/cols_vec/cols2vec.py_in ---
    @@ -0,0 +1,110 @@
    +"""
    +@file cols2vec.py_in
    +
    +@brief Utility to convert Columns to array
    +
    +"""
    +
    +import plpy
    +from utilities.control import MinWarning
    +from utilities.utilities import split_quoted_delimited_str
    +from utilities.utilities import _string_to_array
    +from utilities.validate_args import columns_exist_in_table
    +from utilities.validate_args import is_var_valid
    +from utilities.validate_args import get_cols
    +from utilities.validate_args import quote_ident
    +from utilities.utilities import py_list_to_sql_string
    +
    +
    +m4_changequote(`<!', `!>')
    +
    +
    +def validate_cols2vec_args(source_table, output_table,
    +                           list_of_features, list_of_features_to_exclude, cols_to_output,
**kwargs):
    +    """
    +        Function to validate input parameters
    +    """
    +    if list_of_features.strip() != '*':
    --- End diff --
    
    The checks below are better expressed as assert statements using `_assert(...)`


---

Mime
View raw message