×

Decorrelation of user-defined function invocations in queries

  • US 10,191,943 B2
  • Filed: 01/31/2014
  • Issued: 01/29/2019
  • Est. Priority Date: 01/31/2014
  • Status: Active Grant
First Claim
Patent Images

1. A computer-implemented method for transforming user-defined-function invocations within a query-based environment, the method comprising:

  • receiving a query with a user-defined-function (UDF) containing code written using imperative language constructs;

    transforming the imperatively defined UDF into an algebraic first expression tree, wherein generating part of the algebraic first expression tree comprises;

    determining a type of statement from a plurality of statements,choosing an apply-merge operator when the statement is an assignment statement,choosing a conditional-apply-merge operator when the statement is an if-then-else conditional statement,choosing a cross-apply operator when the statement is a return statement, andapplying the operator to the statement to generate part of the algebraic first expression tree;

    constructing a second expression tree representation of the query absent the UDF;

    generating a transformed expression representation of the query by merging the algebraic first expression tree and the second expression tree based on parameters of the algebraic first expression tree, and attributes of the second expression tree; and

    simplifying the transformed expression using transformation rules, based on a determination that the transformed expression can be simplified.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×