Method, system, and program for optimizing aggregate processing
First Claim
Patent Images
1. A computer-implemented method for processing an aggregate function, comprising:
- if a first argument of the aggregate function is a nested function,generating a composite structure that includes a tagging template for the nested function; and
generating an intermediate result structure for each row to be processed by the aggregate function, wherein each intermediate result structure references the tagging template;
grouping rows that contain a reference to intermediate result structures to form groups, wherein each of the intermediate result structures holds intermediate results including argument input values to represent different levels of nested functions; and
for each group,forming aggregate element structures in memory from the intermediate result structures; and
if the aggregate function specifies ordering, sorting the aggregate element structures based on a sort key in memory.
1 Assignment
0 Petitions
Accused Products
Abstract
Disclosed is a method, system, and program for processing an aggregate function. Rows that contain a reference to intermediate result structures are grouped to form groups. For each group, aggregate element structures are formed from the intermediate result structures and, if the aggregate function specifies ordering, the aggregate element structures are sorted based on a sort key.
34 Citations
27 Claims
-
1. A computer-implemented method for processing an aggregate function, comprising:
-
if a first argument of the aggregate function is a nested function, generating a composite structure that includes a tagging template for the nested function; and generating an intermediate result structure for each row to be processed by the aggregate function, wherein each intermediate result structure references the tagging template; grouping rows that contain a reference to intermediate result structures to form groups, wherein each of the intermediate result structures holds intermediate results including argument input values to represent different levels of nested functions; and for each group, forming aggregate element structures in memory from the intermediate result structures; and if the aggregate function specifies ordering, sorting the aggregate element structures based on a sort key in memory. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A system for processing an aggregate function, comprising:
-
a processor; a memory coupled to the processor; at least one program executed by the processor in the memory to cause the processor to perform; if a first argument of the aggregate function is a nested function, generating a composite structure that includes a tagging template for the nested function; and generating an intermediate result structure for each row to be processed by the aggregate function, wherein each intermediate result structure references the tagging template; grouping rows that contain a reference to intermediate result structures to form groups, wherein each of the intermediate result structures holds intermediate results including argument input values to represent different levels of nested functions; and for each group, forming aggregate element structures from the intermediate result structures; and if the aggregate function specifies ordering, sorting the aggregate element structures based on a sort key. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. An article of manufacture embodied as a computer readable medium comprising one of volatile and non-volatile storage and including a program for processing an aggregate function, wherein the program causes operations to be performed, the operations comprising:
-
if a first argument of the aggregate function is a nested function, generating a composite structure that includes a tagging template for the nested function; and generating an intermediate result structure for each row to be processed by the aggregate function, wherein each intermediate result structure references the tagging template; grouping rows that contain a reference to intermediate result structures to form groups, wherein each of the intermediate result structures holds intermediate results including argument input values to represent different levels of nested functions; and for each group, forming aggregate element structures from the intermediate result structures; and if the aggregate function specifies ordering, sorting the aggregate element structures based on a sort key. - View Dependent Claims (20, 21, 22, 23, 24, 25, 26, 27)
-
Specification