mirror of
https://github.com/apache/impala.git
synced 2025-12-30 03:01:44 -05:00
The SET command has been extended with the following syntax, to allow setting of variables in the Impala Shell: SET VAR:<variable_name>=<value> The UNSET command has also been modified to allow: UNSET VAR:<variable_name> This patch builds on the changes in IMPALA-2179. The main change for this patch was to ensure that all SET commands are processed by the shell, rather than being send to the front end as a query. For this I had to modify the command sanitization function to remove comments that happen in front of a SET command. Comments can be a can of worms to parse, so I tried to be as strict as possible to avoid collateral effects. Comments are only removed if they happen right at the beginning of the line AND before a SET command. NO other comments are touched, including comments before, after or within queries. Change-Id: I87e07385122187ab8d324346499896a3dfbbafe6 Reviewed-on: http://gerrit.cloudera.org:8080/679 Reviewed-by: Casey Ching <casey@cloudera.com> Tested-by: Internal Jenkins