> For the complete documentation index, see [llms.txt](https://docs.pinot.apache.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pinot.apache.org/build-with-pinot/querying-and-sql/multi-stage-query/operator-types.md).

# Operator Types

Describes the multi-stage operators in general

The multi-stage query engine uses a set of operators to process the query. These operators are based on relational algebra, with some modifications to better fit the distributed nature of the engine.

These operators are the execution units that Pinot uses to execute a query. The operators are executed in a pipeline with tree structure, where each operator consumes the output of the previous operators (also known as *upstreams*).

Users do not directly specify these operators. Instead they write SQL queries that are translated into a logical plan, which is then transformed into different operators. The logical plan can be obtained using [explaining a query](/build-with-pinot/querying-and-sql/query-execution-controls/explain-plan-multi-stage.md), while there is no way to get the operators directly. The closest thing to the operators that users can get is the [multi-stage stats](/build-with-pinot/querying-and-sql/multi-stage-query/understanding-stage-stats.md) output.

## Operators vs SQL clauses

These operators are generated from the SQL query that you write, but even they are similar, there is not a one-to-one mapping between the SQL clauses and the operators. Some SQL clauses generate multiple operators, while some operators are generated by multiple SQL clauses.

## Operators vs explain plan nodes

Operators and explain plan nodes are closer than SQL clauses and operators. Although most explain plan nodes can be directly mapped to an operator, there are some exceptions:

* Each `PinotLogicalExchange` and each `PinotLogicalSortExchange` explain node is materialized into a pair of [mailbox send](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/mailbox-send.md) and [mailbox receive](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/mailbox-receive.md) operators.
* All plan nodes that belong to the same leaf stage are executed in the [leaf](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/leaf.md) operator.

In general terms, the operators are the execution units that Pinot uses to execute a query and are also known as the multi-stage physical plan, while the explain plan nodes are logical plans. The difference between the two is that the operators can be actually executed, while the explain plan nodes are the logical representation of the query plan.

## List of operators

The following is a list of operators that are used by the multi-stage query engine:

* [Aggregate](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/aggregate.md)
* [Filter](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/filter.md)
* [Hash Join](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/hash_join.md)
* [Intersect](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/intersect.md)
* [Leaf](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/leaf.md)
* [Mailbox Receive](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/mailbox-receive.md)
* [Mailbox Send](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/mailbox-send.md)
* [Minus](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/minus.md)
* [Sort or Limit](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/sortorlimit.md)
* [Transform](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/transform.md)
* [Union](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/union.md)
* [Unnest](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/unnest.md)
* [Window](/build-with-pinot/querying-and-sql/multi-stage-query/operator-types/window.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pinot.apache.org/build-with-pinot/querying-and-sql/multi-stage-query/operator-types.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
