[ 
https://issues.apache.org/jira/browse/MADLIB-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16537753#comment-16537753
 ] 

Frank McQuillan commented on MADLIB-1241:
-----------------------------------------

Testing PR 282 , it seems if I try to drop a column that does not exist in the 
source table, it does not throw an error and still generates the output table.

This could be problematic if I have a pipeline set up and make a typo on the 
column name, my pipeline will continue with potentially errors.

I suggest if the specified column to drop does not exist in the source table, 
then throw an error saying this.

> Drop columns
> ------------
>
>                 Key: MADLIB-1241
>                 URL: https://issues.apache.org/jira/browse/MADLIB-1241
>             Project: Apache MADlib
>          Issue Type: New Feature
>          Components: Module: Utilities
>            Reporter: Frank McQuillan
>            Assignee: Rahul Iyer
>            Priority: Major
>             Fix For: v1.15
>
>
> Drop Columns
> Drops columns of a table.
> {code}
> dropcols(
>     source_table,
>     out_table,
>     cols_to_drop
>     )
> source_table
> TEXT. Name of the table containing the source data.
> out_table
> TEXT. Name of the generated table containing the output. If a table with the 
> same name already exists, an error will be returned. 
> cols_to_drop
> TEXT, default NULL. Comma-separated string of column names from the source 
> table to drop.  Not all columns of the source table can be dropped.
> Output
> The output table produced by the dropcols function contains the following 
> columns:
> <...>
> Columns from source table, depending on which ones are kept.
> {code}
> Notes
> (1)
> The function
> http://pivotalsoftware.github.io/PDLTools/group__ArrayUtilities.html
> is similar.  To do the equivalent of the PDL Tools one in MADlib, you would 
> do:
> {code}
> dropcols(
>     table_name,
>     output_table,
>     drop_columns
>     )
> {code}
> (2)
> Please maintain the column order of the source table, minus the dropped 
> column(s) of course.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to