IP Library Granted Patent US 9,740,735
Granted Patent B2
US 9,740,735 · App. 11/936,098 · Granted Aug 22, 2017

Programming language extensions in structured queries

Inventors: William D. Ramsey (Redmond, WA); Ronnie I. Chaiken (Woodinville, WA)
Assignee: Microsoft Technology Licensing, LLC
G06F17/30421
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 9,740,735
App. No.
11/936,098
Granted
Aug 22, 2017
Kind
B2
Abstract

The insertion and processing of programming language code (e.g., C#) in SQL statements, and the dynamic compiling of the code to detect errors prior to statement execution. The SQL statement with arbitrary programming language code can then be executed concurrently as a query on a computer cluster. External libraries can be imported and the associated functionality leveraged from within a SQL statement. The programming language compiler performs checking at build time, rather than retuning an error during the statement execution against the cluster, a potentially costly proposition in both computing time and human resources.

Claims (41)

1. A computer system, comprising:

a distributed computer cluster;

one or more processors; and

one or more computer readable storage media having stored thereon computer-executable instructions that are executable by the one or more processors to cause the computer system to generate parallel-processing queries, the computer-executable instructions including instructions that are executable to cause the computer system to perform at least the following:

create a structured query according to a structured query language, the structured query being created for execution in parallel across the distributed computer cluster; and;

receive programming language syntax that comprises a functions;

insert the received programming language syntax into the structured query of the structured query language such that a resulting query includes a structured query language statement in combination with programming language code that specifies both an aggregation and an operation;

insert a keyword into the resulting query that defines an object type in the programming language code;

compile the programming language code, wherein compiling the programming language code is performed based on the object type defined by the inserted keyword; and

execute the resulting query, including both the structured query language and the programming language code, in a distributed manner on the distributed computer cluster.

2. The method of claim 1 , wherein the programming language syntax can be parsed and compiled by a compiler.

3. The system of claim 2 , wherein the compiler is a C# compiler.

4. The system of claim 1 , wherein the syntax is employed with an operator.

5. The system of claim 1 , wherein the syntax is employed with an aggregator.

6. The system of claim 1 , wherein the syntax calls a function from a library of functions.

7. The system of claim 1 , wherein the syntax calls a function from a library, the execution of which occurs as part of executing the query.

8. The system of claim 1 , wherein the aggregation and the operation use a same name that coexists in the programming language code.

9. The system of claim 1 , wherein the programming language code is checked for errors at compile time.

10. The system of claim 1 , wherein a scripting component is used to enable writing of scripts and access to functions of an external library.

11. A method, implemented at a cluster computer system that includes one or more processors, for creating a structured query, the method comprising:

creating a structured query according to a structured query language, the structured query being created for execution in parallel across the cluster computer system;

receiving functions specified in specified in code defined by a programming language, the functions associated with a statement of a structured query language;

inserting the received programming language into the structured query of the structured query language such that a resulting query includes a structured query language statement in combination with programming language code that specifies both an aggregation and an operation;

inserting a keyword into the resulting query that defines an object type in the programming language code;

compiling the programming language code, wherein compiling the programming language code is performed based on the object type defined by the inserted keyword; and

executing the resulting query, including both the structured query language and the programming language code, in a distributed manner across the cluster computer system.

12. The system of claim 11 , further comprising compiling the code prior to execution of the structured query based on a keyword.

13. The method of claim 11 , further comprising calling a function from a library via the structured query.

14. The method of claim 11 , further comprising checking for errors at compile time.

15. The method of claim 11 , further comprising building a SELECT function using aggregators and operators.

16. The method of claim 11 , further comprising utilizing functionality of an external library from within a structured query language statement.

17. A computer program product comprising one or more hardware storage devices having stored thereon computer-executable instructions that are executable by one or more processors of a computer system to cause the computer system to create a structured query, the computer-executable instructions including instructions that are executable to cause the computer system to perform at least the following:

create a structured query according to a structured query language, the structured query being created for execution in parallel across a computer cluster;

receive functions specified in code defined by a programming language, the functions associated with a statement of a structured query language;

insert the received programming language into the structured query of the structured query language such that a resulting query includes a structured query language statement in combination with programming language code that specifies both an aggregation and an operation;

insert a keyword into the resulting query that defines an object type in the programming language code;

compile the programming language code, wherein compiling the programming language code is performed based on the object type defined by the inserted keyword; and

execute the resulting query, including both the structured query language and the programming language code, in a distributed manner across the computer cluster.

18. The computer program product of claim 17 , wherein the code is compiled prior to execution of the structured query based on a SCHEMA keyword.

19. The computer program product of claim 17 , wherein a function from a library is called via the structured query.

20. The computer program product of claim 17 , wherein the aggregation and the operation use a same name that coexists in the programming language code.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034542/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 7, 2007
From: RAMSEY, WILLIAM D; CHAIKEN, RONNIE I
To: MICROSOFT CORPORATION
Reel/Frame 020076/0776 →
Continuity (1)
Related Publication 20090119641A1 · May 7, 2009