> 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/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types.md).

# Operator Types

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](/release-1.3.0/for-users/user-guide-query/query-syntax/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](/release-1.3.0/for-users/user-guide-query/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](/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types/mailbox-send.md) and [mailbox receive](/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types/mailbox-receive.md) operators.
* All plan nodes that belong to the same leaf stage are executed in the [leaf](/release-1.3.0/for-users/user-guide-query/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](/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types/aggregate.md)
* [Filter](/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types/filter.md)
* [Hash Join](/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types/hash_join.md)
* [Intersect](/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types/intersect.md)
* [Leaf](/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types/leaf.md)
* [Mailbox Receive](/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types/mailbox-receive.md)
* [Mailbox Send](/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types/mailbox-send.md)
* [Minus](/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types/minus.md)
* [Sort or Limit](/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types/sortorlimit.md)
* [Transform](/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types/transform.md)
* [Union](/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types/union.md)
* [Window](/release-1.3.0/for-users/user-guide-query/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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pinot.apache.org/release-1.3.0/for-users/user-guide-query/multi-stage-query/operator-types.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
