Uploaded image for project: 'Apache HAWQ (Retired)'
  1. Apache HAWQ (Retired)
  2. HAWQ-1314

Post-upgrade pxf_get_item_fields function break

    XMLWordPrintableJSON

Details

    Description

      After upgrading from HDB 2.0.0.0 to 2.0.1.0 the pxf_get_item_fields function stopped working. The following is the message reported:

      postgres=# SELECT * FROM pxf_get_item_fields('Hive','default.hive_table');
      ERROR:  function return row and query-specified return row do not match
      DETAIL:  Returned row contains 5 attributes, but query expects 4.
      

      The describe table function which uses this function reports the same thing.

      \d hcatalog.default.hive_table

      The reason being the change in the number of out columns from this function. Previously the following were the columns reported:

      postgres=# \df pxf_get_item_fields 
                                                                                List of functions
         Schema   |        Name         | Result data type |                                         Argument data types                                          |  Type  
      ------------+---------------------+------------------+------------------------------------------------------------------------------------------------------+--------
       pg_catalog | pxf_get_item_fields | SETOF record     | profile text, pattern text, OUT path text, OUT itemname text, OUT fieldname text, OUT fieldtype text | normal
      (1 row)
      

      With the newer version we have an extra column

      postgres=# \df pxf_get_item_fields 
                                                                                             List of functions
         Schema   |        Name         | Result data type |                                                      Argument data types                                                       |  Type  
      ------------+---------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------+--------
       pg_catalog | pxf_get_item_fields | SETOF record     | profile text, pattern text, OUT path text, OUT itemname text, OUT fieldname text, OUT fieldtype text, OUT sourcefieldtype text | normal
      (1 row)
      

      The solution to make the describe table and pxf_get_item_fields function working is to update the pg_proc table under pg_catalog schema.

      This issue is a request to either an update in the documentation which mentions this requirement or improving the upgrade process which will take care of catalog update to reflect new behavior of the function.

      Attachments

        Issue Links

          Activity

            People

              odiachenko Oleksandr Diachenko
              gbrahmi Gagan Brahmi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: