Enable the Apache Calcite planner for a session by setting the PLANNER query option, so
that Impala compiles queries with cost-based optimization.
The Calcite planner is disabled by default. Set the PLANNER query option
to CALCITE to enable it for the current session.
-
Set the PLANNER query option to
CALCITE.
- Optional:
Set the FALLBACK_PLANNER query option to specify the planner Impala
uses if the Calcite planner fails to compile a query.
SET FALLBACK_PLANNER=ORIGINAL;
-
Run your query.
You can also set the query option globally for all queries by configuring the default query
options property in Cloudera Manager.
- Go to .
- Search for Default Query Options.
- Enter the query option and value by using the following
format:
OPTION_NAME=VALUE
For multiple options, separate each key-value
pair with a comma.
- Save the changes.
- Restart the Impala service to apply the updated configuration.
Impala compiles the query with the Calcite planner. If compilation fails and a different
fallback planner is set, Impala compiles the query with the fallback planner.
The session uses the Calcite planner for subsequent queries until you change the
PLANNER query option.