This paper which appeared in this yearâ€™s VLDB talks about the internals of the SQL query engine atop Googleâ€™s Map Reduce framework. Its currently used by over 1000 people in Google serving over 10,000 queries each day that span across two data centers, with two thousand cores each on 1.5 PB of compressed data. The queries claim to have latencies of the order of 10 seconds.
Looks like the motivation for this engine was driven by the need to move away from a proprietary database appliance Google was using as a data warehouse for Google Ads data.
Architecture of the system:
A distributed worker pool takes in a query execution plan and executes Map Reduce jobs. The pool consists of master and worker nodes, plus an overall gatekeeper called the master watcher. The workers manipulate the data for all the tables defined in the metadata layer.
A query server acts as the first point of interception of a query. It parses the query and then forwards the execution plan to the master node in the worker pool.
The metadata server provides an API to store and fetch metadata such as table names and schemas, and pointers to the underlying data. The metadata server is also responsible for storing ACLs (Access Control Lists) and other security related information about the tables. The server uses Bigtable as the persistent backing store.
It also has a few different client interfaces including a CLI and a Web based UI.
The engine supports most of the SQL92 constructs. In addition the query execution engine also embeds Sawzall language engine so users can write Sawzall functions which can then be invoked from Tenzing. They seem to have spent a lot of effort in enabling efficient joins across heterogeneous data sources. All variations of joins such as inner, left, right, cross, and full outer joins and equi semi-equi, non-equi and function based joins are supported by Tenzing. Also there seems to be support for DDLs, DMLs and logical views over data.
Since the engine is very tightly coupled with the underlying Map Reduce framework some enhancements had to made to the underlying framework primarily to bring down the latency of the queries. Specifically The MapReduce and Tenzing teams collaboratively came up with the pool implementation.
Previewing from http://research.google.com/pubs/archive/37200.pdf