lsy3993 commented on code in PR #1908: URL: https://github.com/apache/doris-website/pull/1908#discussion_r1928366469
########## docs/sql-manual/sql-statements/session/variable/SET-VARIABLE.md: ########## @@ -29,38 +29,56 @@ under the License. This statement is mainly used to modify Doris system variables. These system variables can be modified at the global and session level, and some can also be modified dynamically. You can also view these system variables with `SHOW VARIABLE`. -grammar: +## Syntax ```sql -SET variable_assignment [, variable_assignment] ... +SET variable_assignment [, variable_assignment] [ ... ] ``` -illustrate: +Where: +```sql +variable_assignment + : [(<user_var_name> = expr) | ([<effective_scope>] <system_var_name> = expr)] +``` + +## Required Parameters +**<user_var_name>** +> Specifies the variable of user level, for example : time_zone and so on Review Comment: done ########## docs/sql-manual/sql-statements/session/variable/SET-VARIABLE.md: ########## @@ -29,38 +29,56 @@ under the License. This statement is mainly used to modify Doris system variables. These system variables can be modified at the global and session level, and some can also be modified dynamically. You can also view these system variables with `SHOW VARIABLE`. -grammar: +## Syntax ```sql -SET variable_assignment [, variable_assignment] ... +SET variable_assignment [, variable_assignment] [ ... ] ``` -illustrate: +Where: +```sql +variable_assignment + : [(<user_var_name> = expr) | ([<effective_scope>] <system_var_name> = expr)] +``` + +## Required Parameters +**<user_var_name>** +> Specifies the variable of user level, for example : time_zone and so on + +**<system_var_name>** +> Specifies the variable of system level, for example : exec_mem_limit and so on + +## Optional Parameters +**<effective_scope>** + +> Effective scope is one of `GLOBAL` or `SESSION`. If there is no effective scope, default value is `SESSION`. -1. variable_assignment: - user_var_name = expr - | [GLOBAL | SESSION] system_var_name = expr +## Access Control Requirements +Users executing this SQL command must have at least the following privileges: -> Note: -> -> 1. Only ADMIN users can set variables to take effect globally -> 2. The globally effective variable affects the current session and new sessions thereafter, but does not affect other sessions that currently exist. +| Privilege | Object | Notes | +| :--------- | :----- | :------------------------------------------- | +| ADMIN_PRIV | Session | set global variables need admin privilege | + + +## Usage Notes + +- Only ADMIN users can set variables to take effect globally +- The globally effective variable affects the current session and new sessions thereafter, but does not affect other sessions that currently exist. ## Example Review Comment: done ########## docs/sql-manual/sql-statements/session/variable/SHOW-VARIABLES.md: ########## @@ -29,43 +29,66 @@ under the License. This statement is used to display Doris system variables, which can be queried by conditions -grammar: +## Syntax ```sql -SHOW [GLOBAL | SESSION] VARIABLES - [LIKE 'pattern' | WHERE expr] +SHOW [<effective_scope>] VARIABLES [<like_pattern> | <where>] Review Comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
