The UI calls the execute query interface to the driver. The driver creates a session handle for the query and sends the query to the compiler to generate an execution plan.
The compiler needs the metadata to send a request for “getMetaData” and receives the “sendMetaData” request from metastore.
This metadata does the typecheck of the query expression and prunes the partitions based on query predicates.
The execution engine submits these stages to appropriate components (steps 6, 6.1, 6.2 and 6.3). Once the output is generated it is written to a temporary HDFS file through serializer.
The content of the file is read by execution engine directly from HDFS and displayed to UI clients.