[ https://issues.apache.org/jira/browse/MADLIB-1413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Frank McQuillan updated MADLIB-1413: ------------------------------------ Comment: was deleted (was: https://github.com/apache/madlib/pull/484) > Last optional param in summary errors when NULL > ----------------------------------------------- > > Key: MADLIB-1413 > URL: https://issues.apache.org/jira/browse/MADLIB-1413 > Project: Apache MADlib > Issue Type: Improvement > Components: Module: Descriptive Statistics > Reporter: Frank McQuillan > Assignee: Orhan Kislal > Priority: Minor > Fix For: v1.17 > > > {code} > DROP TABLE IF EXISTS abalone_summary_exact; > SELECT madlib.summary ( > 'abalone_encoded', -- source_table > 'abalone_summary_exact', -- output_table > NULL, -- target_cols > NULL, -- grouping_cols > TRUE, -- get_distinct > TRUE, -- get_quartiles > NULL, -- quantile_array > 10, -- how_many_mfv > FALSE, -- get_estimate > NULL -- n_cols_per_run > ); > {code} > produces this error > {code} > ERROR: plpy.Error: Summary - Invalid parameter: Number of columns per run > should be positive (plpython.c:5038) > CONTEXT: Traceback (most recent call last): > PL/Python function "summary", line 24, in <module> > get_estimates, n_cols_per_run) > PL/Python function "summary", line 67, in summary > PL/Python function "summary", line 388, in run > PL/Python function "summary", line 105, in _validate_params > PL/Python function "summary", line 117, in _assert > PL/Python function "summary" > {code} > which seems wrong since the last param is optional. > The following does work: > {code} > DROP TABLE IF EXISTS abalone_summary_exact; > SELECT madlib.summary ( > 'abalone_encoded', -- source_table > 'abalone_summary_exact', -- output_table > NULL, -- target_cols > NULL, -- grouping_cols > TRUE, -- get_distinct > TRUE, -- get_quartiles > NULL, -- quantile_array > 10, -- how_many_mfv > FALSE, -- get_estimate > 15 -- n_cols_per_run > ); > {code} > and so does this: > {code} > DROP TABLE IF EXISTS abalone_summary_exact; > SELECT madlib.summary ( > 'abalone_encoded', -- source_table > 'abalone_summary_exact', -- output_table > NULL, -- target_cols > NULL, -- grouping_cols > TRUE, -- get_distinct > TRUE, -- get_quartiles > NULL, -- quantile_array > 10, -- how_many_mfv > FALSE -- get_estimate > ); > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)