Github user orhankislal commented on a diff in the pull request: https://github.com/apache/incubator-madlib/pull/89#discussion_r98128463 --- Diff: src/ports/postgres/modules/kmeans/kmeans.py_in --- @@ -34,6 +38,34 @@ def kmeans_validate_src(schema_madlib, rel_source, **kwargs): # ---------------------------------------------------------------------- +def kmeans_validate_expr(schema_madlib, rel_source, expr_point, **kwargs): + """ + Validation function for the expr_point parameter + expr_point accepts 2 formats: + - A single column name + - An array expression + If the array expression is used, we use the is_var_valid function to + verify. This allows the regular array notation as well as any function + that returns an array. + """ + + if columns_exist_in_table(rel_source, [expr_point]): + return rel_source, False + + if is_var_valid(rel_source, expr_point): --- End diff -- I think this is a better solution but we still allow non numeric arrays.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---