Patent ID: 7702616

Claim:
A computer-readable storage medium storing thereon computer-readable instructions that, when executed by a processor, cause the processor to join two or more tables, comprising: instructions for obtaining a query including a join query, the join query requesting that a new table be generated from data obtained from two or more tables, the two or more tables being stored at two or more data sources, wherein each of the two or more tables is stored at a single one of the two or more different data sources; instructions for identifying from the query one or more columns for each of the tables for which data is to be obtained; instructions for generating a query plan to execute the query to obtain data for the identified columns from the two or more tables; instructions for parsing the query to generate an operator tree from the query; instructions for performing optimization on the operator tree in accordance with a set of optimization rules; instructions for restructuring the operator tree in accordance with each of the two or more different data sources such that a different segment of the operator tree is associated with each of the two or more different data sources data source; instructions for obtaining an operator mapping associated with each data source; instructions for determining from the operator mapping whether an operator in the operator tree is supported by the data source; and instructions for instructing the data source to execute the operator when it is determined from the operator mapping that the operator is supported by the data source.