Github user fmcquillan99 commented on the issue:

    https://github.com/apache/madlib/pull/291
  
    In vec2cols,
    
    ```
    SELECT madlib.vec2cols(
        'golf',                           -- source table
        'vec2cols_result',                -- output table
        'clouds_airquality',              -- column with array entries to split
        ARRAY['clouds', 'air_quality'],   -- feature names
        '"OUTLOOK", id'                   -- columns to keep from source table
    );
    ```
    
    results in 
    ```
     clouds | air_quality | OUTLOOK  | id
    --------+-------------+----------+----
     none   | unhealthy   | sunny    |  1
     none   | moderate    | sunny    |  2
     low    | moderate    | overcast |  3
     low    | moderate    | rain     |  4
     medium | good        | rain     |  5
     low    | unhealthy   | rain     |  6
     medium | moderate    | overcast |  7
     high   | unhealthy   | sunny    |  8
     high   | good        | sunny    |  9
     medium | good        | rain     | 10
     none   | good        | sunny    | 11
     medium | moderate    | overcast | 12
     medium | moderate    | overcast | 13
     low    | unhealthy   | rain     | 14
    (14 rows)
    ```
    
    but the split columns `clouds` and `air_quality` should 
    be the right side of the table.  This will make
    it consistent with the way cols2vec works.
    
    
    



---

Reply via email to