IP Library Granted Patent US 12694032
Granted Patent B2
US 12694032 · App. 18/449,282 · Granted Jul 28, 2026

Executing a query expression via a database system by processing a prior row index identifier

Inventor: Jason Arnold (Chicago, IL)
Assignee: Ocient Holdings LLC
G06F16/24566G06F16/242
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12694032
App. No.
18/449,282
Granted
Jul 28, 2026
Kind
B2
Abstract

A query processing system is operable to receive a query expression that includes a call to a computing window function indicating an expression that includes a column reference that includes a prior row index identifier. The computing window function is executed based on accessing at ordered set of rows of the database indicated in the call to the computing window function. An output column is generated based on generating output for each row of a set of rows in the ordered set of rows by evaluating the expression based on performing at least one operation upon a column value, determined based on applying the column reference, of a previous row in the ordered set of rows. A query resultant for the query expression is generated based on the output column generated for the rows in the ordered set of rows.

Claims (57)

1 . A method for execution by a query processing system, comprising:

receiving a query expression that includes a call to a computing window function, the call indicating:

a computing window function keyword identifying the computing window function in accordance with a computing window function definition;

a window definition indicating an ordered set of rows of a dataset stored in a database, wherein the dataset comprises a plurality of rows of columnar data, and wherein the ordered set of rows is defined in accordance with the window definition independently of any temporary storage tables; and

an argument including a column reference that includes a prior row index identifier identifying a column value of a previous row relative to a given row of the ordered set of rows; and

executing the computing window function in accordance with execution of the query expression against a database by:

accessing the ordered set of rows of the dataset identified by the window definition;

generating an output column for the ordered set of rows by evaluating the argument of the computing window function for rows of the ordered set of rows, wherein generating the output column includes performing an operation upon the column value of the previous row relative to the given row as identified by the prior row index identifier of the column reference; and

appending the output column to the ordered set of rows as part of a query resultant of the query expression; and

communicating the query resultant for the query expression.

2 . The method of claim 1 , wherein the column reference identifies a column, wherein the column value of the previous row of the ordered set of rows identified by the window definition is a column value of the column based on the column being identified by the column reference.

3 . The method of claim 2 , wherein the ordered set of rows identified by the window definition includes a set of existing columns, wherein the output column is separate from the set of existing columns, wherein the column identified by the column reference is an existing column of the existing set of columns, and wherein the output for the each row is generated as a function of the column value of the existing column for the previous row.

4 . The method of claim 2 , wherein the column identified by the column reference is the output column, and wherein the output for the each row is generated as a function of the output for the previous row based on having already generated the output for the previous row in the ordered set of rows.

5 . The method of claim 2 , wherein the number of rows between the each row and the previous row of the ordered set of rows identified by the window definition includes at least one row based on the integer value of the prior row index identifier being strictly greater than one.

6 . The method of claim 2 , wherein the call to the computing window function further includes a second column reference that includes the prior row index identifier, wherein the second column reference identifies a second column that is different from the column, and wherein the output for each row of a set of rows in the ordered set of rows is further generated as a function of a second column value of the second column, determined based on applying the second column reference, of the previous row in the ordered set of rows relative to the each of the set of rows based on the second column reference including the prior row index identifier.

7 . The method of claim 2 , wherein the call to the computing window function further includes a second column reference that includes a second prior row index identifier, wherein the second column reference identifies the column, and wherein the output for each row of a set of rows in the ordered set of rows is further generated as a function of a second column value of the column, determined based on applying the second column reference, of a second previous row in the ordered set of rows relative to the each of the set of rows based on the second column reference including the second prior row index identifier, wherein the second previous row is between the row and the previous row in the ordered set of rows based on a first absolute value of the integer value of the prior row index identifier being greater than a second absolute value of a second integer value of the second prior row index identifier.

8 . The method of claim 1 , wherein the prior row index identifier is identified via a negation symbol preceding an integer value of the prior row index identifier.

9 . The method of claim 1 , wherein the prior row index identifier is included between bracketing symbols that follow a column identifier of the column reference.

10 . The method of claim 1 , wherein the call to the computing window function includes a set of initialization output expressions, and wherein generating the output for the rows in the ordered set of rows is based on:

setting the output for each of a first set of rows in the ordered set of rows as initialization output, wherein the set of rows is a remaining set of rows after the first set of rows, and wherein the initialization output for the each of the first set of rows is determined based on applying a corresponding one of the set of initialization output expressions.

11 . The method of claim 1 , wherein the database includes time-series data as a plurality of rows, wherein the ordered set of rows identified by the window definition includes a set of rows from the plurality of rows temporally ordered in accordance with time values of a temporal field of the ordered set of rows.

12 . The method of claim 11 , wherein the method further includes:

generating the ordered set of rows by resampling a previous set of rows, wherein the temporal field of each of the ordered set of rows includes fixed-interval temporal values generated in the resampling of the previous set of rows.

13 . The method of claim 1 , wherein the expression includes Structured Query Language (SQL) syntax for a window definition indicating the ordered set of rows, wherein the query expression further includes SQL syntax indicating an ordering of the ordered set of rows.

14 . The method of claim 1 , wherein the query expression is a recursive expression for a recursive definition, and wherein generating the output column for the ordered set of rows is further based on applying the recursive definition.

15 . The method of claim 1 , wherein the query expression is configured in accordance with implementing one of: an exponential smoothing function, a finite response filter, a kernel function, or a digital signal processing function, and wherein the output column is generated based on applying the one of: the exponential smoothing function, the finite response filter, the kernel function, or the digital signal processing function.

16 . A query and response sub-system of a database system, wherein the query and response sub-system comprises:

a plurality of computing device clusters, wherein a computing device cluster of the plurality of computing device clusters includes a plurality of computing devices, wherein a computing device of the plurality of computing devices includes a plurality of computing nodes, wherein a first computing node of the plurality of computing nodes is operable to:

receive a query, wherein the query includes a plurality of sets of code terms, wherein a set of code terms of the plurality of sets of code terms includes a call to a computing window function, the call including:

a computing window function keyword identifying the computing window function in accordance with a computing window function definition;

a window definition identifying an ordered set of rows of a dataset stored in a store and compute sub-system, wherein the dataset includes a plurality of rows of columnar data, and wherein the columnar data includes a plurality of columns of data; and

an argument indicating a basis upon which output for the ordered set of rows is generated, wherein the argument includes a column reference that includes a prior row index identifier identifying a column value of a previous row relative to a given row of the ordered set of rows; and

execute the computing window function in accordance with execution of the query by:

accessing the ordered set of rows of the dataset identified by the window definition;

generating an output column for the ordered set of rows by evaluating the argument of the computing window function for rows of the ordered set of rows, wherein generating the output column includes performing an operation upon the column value of the previous row relative to the given row as identified by the prior row index identifier of the column reference; and

appending the output column to the ordered set of rows as part of a query resultant of the query; and

communicate the query resultant for the query.

17 . The query and response sub system of claim 16 , wherein the first computing node comprises:

a plurality of processing core resources, wherein:

a first processing core resource of the plurality of processing core resources is configured to receive the query;

a second processing core resource of the plurality of processing core resources is configured to execute the computing window function in accordance with execution of the query; and

a third processing core resource of the plurality of processing core resources is configured to communicate the query resultant for the query.

18 . A computer readable memory device that comprises:

a memory that stores operational instructions that, when executed by a first computing node of a plurality of computing nodes of plurality of computing devices of a computing device cluster of a plurality of computing device clusters, cause the first computing node to:

receive a query, wherein the query includes a plurality of sets of code terms, wherein a set of code terms of the plurality of sets of code terms includes a call to a computing window function, the call including:

a computing window function keyword identifying the computing window function in accordance with a computing window function definition;

a window definition identifying an ordered set of rows of a dataset stored in a store and compute sub-system, wherein the dataset includes a plurality of rows of columnar data, and wherein the columnar data includes a plurality of columns of data; and

an argument indicating a basis upon which output for the ordered set of rows is generated, wherein the argument includes a column reference that includes a prior row index identifier identifying a column value of a previous row relative to a given row of the ordered set of rows; and

execute the computing window function in accordance with execution of the query by:

accessing the ordered set of rows of the dataset identified by the window definition;

generating an output column for the ordered set of rows by evaluating the argument of the computing window function for rows of the ordered set of rows, wherein generating the output column includes performing an operation upon the column value of the previous row relative to the given row as identified by the prior row index identifier of the column reference; and

appending the output column to the ordered set of rows as part of a query resultant of the query; and

communicate the query resultant for the query.

19 . The computer readable memory device of claim 18 , wherein the memory further stores operational instructions that, when executed by:

a first processing core resource of a first computing node of a first computing device of the computing device cluster, cause the first processing core resource to receive the query;

a second processing core resource of the first computing node, cause the second processing core resource to execute the computing window function in accordance with execution of the query; and

third processing core resource of the first computing node, cause the third processing core resource to communicate the query resultant for the query.