Uploaded image for project: 'Apache MADlib'
  1. Apache MADlib
  2. MADLIB-1377

Pivot documentation is wrong about some optional parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • v1.17
    • Documentation
    • None

    Description

      I tried to output an array column instead of multiple columns using the optional parameter output_type, but it throws an error:

      --This is based on the example from the documentation page
      
      --This works ok
      SELECT madlib.pivot(source_table := 'pivset', out_table := 'pivout', index := 'id', pivot_cols := 'piv', pivot_values := 'val');
       pivot 
      -------
       
      (1 row)
      
      --Adding the optional parameter, output_type, doesn't work:
      SELECT madlib.pivot(source_table := 'pivset', out_table := 'pivout', index := 'id', pivot_cols := 'piv', pivot_values := 'val', output_type := 'array');
      ERROR:  function madlib.pivot(source_table => unknown, out_table => unknown, index => unknown, pivot_cols => unknown, pivot_values => unknown, output_type => unknown) does not exist
      

      Looking at the corresponding madlib.pivot() function, there's no parameter defined as default, so it seems that you can't have optional parameters as stated on the documentation?

      Attachments

        Activity

          People

            Unassigned Unassigned
            jisaitua Juan Ignacio Saitua
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: