Ranking operations in query processing
AssigneeSap SE
InventorsAlena Bakulina, Christoph Weyerhaeuser
Life of this patent
Estimating the term…
Abstract
Described herein is a top operator of a calculation scenario of a calculation engine that can process and rank data according to certain logical criterion requested in a query. Based on the ranked data, the top operator can provide the data results in response to the query. The top operator can provide additional useful data in the data results when certain conditions are met. The top operator can provide the data results in a useful and efficient manner.
Claims20
A system comprising:
- at least one processor;
- and
- machine-readable memory storing instructions, which when executed by the at least one processor, cause the at least one programmable processor to perform operations comprising:
- receiving a query to provide top logic for a set of data located in a data table, the query specifying a calculation scenario comprising a top operator of a calculation engine, the top operator specifying an attribute and a target value, the attribute comprising a base attribute and a top attribute, and the target value defining a target sum;
- sorting, by the top operator, the set of data within the data table according to a field direction that indicates a direction the set of data is to be sorted, the sorting including dividing the set of data within the data table into one or more groups based on the base attribute, the one or more groups comprising one or more fields of the data table;
- processing, by the top operator, each field of each group of the one or more groups in the field direction, the processing comprising aggregating values of consecutive top attributes in the field direction until the aggregate value of the top attributes is equal to or greater than the target sum;
- and
- providing, by the top operator, in response to the query, each field in each group that includes a top attribute that forms a part of the aggregate value.
A computer-implemented method, comprising:
- receiving a query to provide top logic for a set of data located in a data table, the query specifying a calculation scenario comprising a query top operator of a calculation engine, the top operator specifying an attribute and a target value, the attribute comprising a base attribute and a top attribute, and the target value defining a target sum;
- sorting, by the top operator, the set of data within the data table according to a field direction that indicates a direction the set of data is to be sorted, the sorting including dividing the set of data within the data table into one or more groups based on the base attribute, the one or more groups comprising one or more fields of the data table;
- processing, by the top operator, each field of each group of the one or more groups in the field direction, the processing comprising aggregating values of consecutive top attributes in the field direction until the aggregate value of the top attributes is equal to or greater than the target sum;
- and
- providing, by the top operator, in response to the query, each field in each group that includes a top attribute that forms a part of the aggregate value.
A non-transitory computer-readable medium storing instructions, which when executed by at least one data processor, result in operations comprising:
- receiving a query to provide top logic for a set of data located in a data table, the query specifying a calculation scenario comprising a query top operator of a calculation engine, the top operator specifying an attribute and a target value, the attribute comprising a base attribute and a top attribute, and the target value defining a target sum;
- sorting, by the top operator, the set of data within the data table according to a field direction that indicates a direction the set of data is to be sorted, the sorting including dividing the set of data within the data table into one or more groups based on the base attribute, the one or more groups comprising one or more fields of the data table;
- processing, by the top operator, each field of each group of the one or more groups in the field direction, the processing comprising aggregating values of consecutive top attributes in the field direction until the aggregate value of the top attributes is equal to or greater than the target sum;
- and
- providing, by the top operator, in response to the query, each field in each group that includes a top attribute that forms a part of the aggregate value.
Dependencies are inferred from the claim text.