Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 2.39 KB

v2-multi-stage-query-engine.md

File metadata and controls

65 lines (46 loc) · 2.39 KB
description
To query using distributed joins, window functions, and other multi-stage operators in real time, turn on the multi-stage query engine (v2).

Use the multi-stage query engine (v2)

To query using distributed joins, window functions, and other multi-stage operators in real time, you must enable the multi-stage query engine (v2). To enable v2, do any of the following:

To learn more about what the multi-stage query engine is, see Multi-stage query engine (v2).

Enable the multi-stage query engine in the Query Console

  • To enable the multi-stage query engine, in the Pinot Query Console, select the Use Multi-Stage Engine check box.

Pinot Query Console with Use Multi Stage Engine enabled

Programmatically access the multi-stage query engine

To query the Pinot multi-stage query engine, use REST APIs or the query option:

Use REST APIs

The Controller admin API and the Broker query API allow optional JSON payload for configuration. For example:

curl -X POST http://localhost:9000/sql -d 
'
{
  "sql": "select * from baseballStats limit 10",
  "trace": false,
  "queryOptions": "useMultistageEngine=true"
}
'
curl -X POST http://localhost:8000/query/sql -d '
{
  "sql": "select * from baseballStats limit 10",
  "trace": false,
  "queryOptions": "useMultistageEngine=true"
}
'

Use the query option

To enable the multi-stage engine via a query outside of the API, add the useMultistageEngine=true option to the top of your query.

For example:

SET useMultistageEngine=true; -- indicator to enable the multi-stage engine.
SELECT * from baseballStats limit 10