Implicit UDR execution of a user-defined aggregate

A user-defined aggregate (UDA) can execute in parallel as long as the UDR is parallelizable and calls only DataBlade® API functions that are PDQ thread safe.

For example, suppose you create a UDA named uda and use it in the following SQL query:
select grp, uda(udt_col) FROM tab GROUP BY grp;
If the data type of column udt_col is a UDT whose aggregation requires a UDR call, the following operations can execute in parallel:
  • Each group thread executes the aggregation UDR uda in parallel.
  • If the GROUP BY column grp is a UDT column, the equal() UDR function on the UDT column executes in parallel by the scan thread for the hash repartitioning on the group by keys.
  • If the table tab is fragmented, multiple scan threads can read the table in parallel.