Gagan Brahmi created HAWQ-1314:
----------------------------------
Summary: Post-upgrade pxf_get_item_fields function break
Key: HAWQ-1314
URL: https://issues.apache.org/jira/browse/HAWQ-1314
Project: Apache HAWQ
Issue Type: Bug
Components: Catalog, Hcatalog, PXF
Reporter: Gagan Brahmi
Assignee: Ed Espino
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:
{code}
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.
{code}
The describe table function which uses this function reports the same thing.
{code}\d hcatalog.default.hive_table{code}
The reason being the change in the number of out columns from this function.
Previously the following were the columns reported:
{code}
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)
{code}
With the newer version we have an extra column
{code}
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)
{code}
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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)