EXTFNAPIV4_DESCRIBE_PARM_TABLE_UNUSED_COLUMNS Attribute (Set)

The EXTFNAPIV4_DESCRIBE_PARM_TABLE_UNUSED_COLUMNS attribute lists unconsumed columns. Used in a describe_parameter_set scenario.

Data Type

a_v4_extfn_column_list

Description

The list of output table columns that are not going to be consumed by the server or the UDF.

For the output table parameter, the UDF normally produces the data for all the columns, and the server consumes all the columns. The same holds true for the input table parameter where the server normally produces the data for all the columns, and the UDF consumes all the columns.

However, in some cases the server, or the UDF, may not consume all the columns. The best practice in such a case is that the UDF performs a GET for the output table on the describe attribute EXTFNAPIV4_DESCRIBE_PARM_TABLE_UNUSED_COLUMNS. This action queries the server for the list of output table columns which are not going to be consumed by the server. The list can then be used by the UDF when populating the column data for the output table; that is, the UDF skips populating data for unused columns.

In summary, for the output table the UDF polls the list of unused columns. For the input table, the UDF pushes the list of unused columns.

Usage

The UDF sets this property during Optimization if it is not going to use certain columns of the input table parameter. The UDF must allocate a a_v4_extfn_column_list that includes all the columns of the output table, and then must pass it to the server. The server then marks all the un-projected column ordinals as 1. The server copies the list into its internal data structure.

Returns

On success, returns the size of the column list: sizeof(a_v4_extfn_column_list) + sizeof(a_sql_uint32) * number result columns.

On failure, returns one of the generic describe_parameter errors or:

Query Processing States

Valid in:
  • Optimization state
Related reference
EXTFNAPIV4_DESCRIBE_PARM_TABLE_UNUSED_COLUMNS Attribute (Get)