Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Cannot Reproduce
-
Impala 2.3.0
-
None
Description
The Impala shell handle SET commands in two different ways:
- Locally, if the line starts with the keyword SET (e.g. "SET EXPLAIN_LEVEL=3")
- As a query, if the lines starts with a comment (e.g. "-- dummy comment\nSET EXPLAIN_LEVEL=3")
In the first case above the shell keeps the state of the set options locally and passes that to the Beeswax service as a configuration object. In the second case, the whole statement (comments included) are sent to the Impala frontend as a query.
The inconsistency in handling SET statements, causes the Impala shell local configuration to go out-of-sync with the Impala frontend's, as shown below:
[poti:21000] > set explain_level=3; EXPLAIN_LEVEL set to 3 [poti:21000] > -- this one executes as a query > set explain_level=2; Query: -- set explain_level=2 Fetched 0 row(s) in 0.27s [poti:21000] > set; Query options (defaults shown in []): ... EXPLAIN_LEVEL: 3 ... [poti:21000] > -- again, this executes as a query > set; Query: -- set +---------------------------------+-------+ | option | value | +---------------------------------+-------+ ... | EXPLAIN_LEVEL | 2 | ... +---------------------------------+-------+ Fetched 31 row(s) in 0.01s [poti:21000] >