Enabling the Calcite planner [Preview]

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.

  1. Set the PLANNER query option to CALCITE.
    SET PLANNER=CALCITE;
  2. 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;
  3. Run your query.

    You can also set the query option globally for all queries by configuring the default query options property in Cloudera Manager.

    1. Go to Clusters > Impala > Configuration.
    2. Search for Default Query Options.
    3. 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.
    4. Save the changes.
    5. 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.