Use the a_v4_extfn_col_subset_of_input structure to declare that an output column has a value that is always taken from a particular input column to the UDF.
typedef struct a_v4_extfn_col_subset_of_input { a_sql_uint32 source_table_parameter_arg_num; // arg_num of the source table parameter a_sql_uint32 source_column_number; // source column of the source table } a_v4_extfn_col_subset_of_input;
Data Member | Data Type | Description |
---|---|---|
source_table_parameter_arg_num | a_sql_uint32 * | arg_num of the source TABLE parameter |
source_column_number | a_sql_uint32 * | Source column of the source table |
The query optimizer uses the subset of input to infer logical properties of the values in the output column. For example, the number of distinct values in the input column is an upper bound on the distinct values in the output column, and any local predicates on the input column also hold on the output column.