Patent ID: 11899664
Assignee: YAHOO AD TECH LLC
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 14:
15. A device comprising:
a processor configured to:
identify a database comprising a plurality of information organized into at least a set of columns;
identify a Column Object (CO) within a column of the database, the CO comprising information related to a column name, a Structured Query Language (SQL) expression and an alias;
expand templated fragments associated with the SQL expression of the identified CO;
parse each of the expanded templated fragments of the SQL expression, and determine a syntax tree of the SQL expression from the expanded templated fragments;
analyze the syntax tree of the SQL expression;
create, based on the analysis, a new CO related to the identified CO, the new CO comprising information related to the column name, a templated expression of the SQL expression and the alias, the creation of the new CO comprising:
identifying an unnested SQL fragment associated with the CO;
parsing the unnested SQL fragment into the syntax tree;
analyzing the syntax tree, and identifying aggregation function calls;
translating each identified aggregation function call into a set of inner aggregations;
assigning each inner aggregation function a unique alias;
converting each inner aggregation into another CO;
translating each aggregation function call into a set of outer aggregations;
modifying operands of the syntax tree to reference the unique aliases;
analyzing the modified syntax tree and generating a new native SQL expression;
replacing aliases in the new native SQL expression with the templated expression; and
converting the outer aggregations into the new CO;

analyze information related to the new CO, and determine a type of dimension nesting, the type of dimension nesting being based on whether a referenced join is to occur as an inner query or outer query; and
perform the determined type of dimension nesting.