SET Statement

The SET statement specifies values for query options that control the runtime behavior of other statements within the same session.

When issued in impala-shell, the SET command is interpreted as an impala-shell command that has differences from the SQL SET statement. See impala-shell Command Reference for the information about the SET command in impala-shell.


SET query_option=option_value
SET query_option=""

SET and SET ALL with no arguments return a result set consisting of all the applicable query options and their current values.

The query_option and option_value are case-insensitive.

Unlike the impala-shell command version of SET, when used as a SQL statement, the string values for option_value need to be quoted, e.g. SET option="new_value".

The SET query_option = "" statement unsets the value of the query_option in the current session, reverting it to the default state. In impala-shell, use the UNSET command to set a query option to it default.

Each query option has a specific allowed notation for its arguments. See Query Options for the SET Statement for the details of each query option.

Usage notes:

In Impala 2.11 and higher, the outputs of the SET and SET ALL statements were reorganized as below:

Added in: Impala 2.0.0

SET has always been available as an impala-shell command. Promoting it to a SQL statement lets you use this feature in client applications through the JDBC and ODBC APIs.

HDFS permissions: This statement does not touch any HDFS files or directories, therefore no HDFS permissions are required.

Related information:

See Query Options for the SET Statement for the query options you can adjust using this statement.