Class SqlSetOption

All Implemented Interfaces:
Cloneable

public class SqlSetOption extends SqlAlter
SQL parse tree node to represent SET and RESET statements, optionally preceded by ALTER SYSTEM or ALTER SESSION.

Syntax:

ALTER scope SET `option.name` = value;
ALTER scope RESET `option`.`name`;
ALTER scope RESET ALL;

SET `option.name` = value;
RESET `option`.`name`;
RESET ALL;

If SqlAlter.scope is null, assume a default scope. (The default scope is defined by the project using Calcite, but is typically SESSION.)

If value is null, assume RESET; if value is not null, assume SET.

Examples:

  • ALTER SYSTEM SET `my`.`param1` = 1
  • SET `my.param2` = 1
  • SET `my.param3` = ON
  • ALTER SYSTEM RESET `my`.`param1`
  • RESET `my.param2`
  • ALTER SESSION RESET ALL