From 3f5239aaef870d0b83fa164da069692ecc2ef4a4 Mon Sep 17 00:00:00 2001 From: sharangk Date: Wed, 28 Aug 2019 11:35:11 +0530 Subject: [PATCH 1/4] Set and reset documentation --- docs/sql-ref-syntax-aux-conf-mgmt-reset.md | 18 +++++++- docs/sql-ref-syntax-aux-conf-mgmt-set.md | 49 +++++++++++++++++++++- 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/docs/sql-ref-syntax-aux-conf-mgmt-reset.md b/docs/sql-ref-syntax-aux-conf-mgmt-reset.md index ad2d7f9a83316..838eeb8e1ce70 100644 --- a/docs/sql-ref-syntax-aux-conf-mgmt-reset.md +++ b/docs/sql-ref-syntax-aux-conf-mgmt-reset.md @@ -19,4 +19,20 @@ license: | limitations under the License. --- -**This page is under construction** +### Description +Reset all SQLConf properties to the default values. After RESET command, executing SET command will output empty. + +### Syntax +{% highlight sql %} +RESET +{% endhighlight %} + + +### Examples +{% highlight sql %} +-- Reset all SQLConf properties to the default values. +RESET; +{% endhighlight %} + +### Related Statements +- [SET](sql-ref-syntax-aux-conf-mgmt-set.html) diff --git a/docs/sql-ref-syntax-aux-conf-mgmt-set.md b/docs/sql-ref-syntax-aux-conf-mgmt-set.md index c38d68dbb4f1d..7d3941b69aabd 100644 --- a/docs/sql-ref-syntax-aux-conf-mgmt-set.md +++ b/docs/sql-ref-syntax-aux-conf-mgmt-set.md @@ -19,4 +19,51 @@ license: | limitations under the License. --- -**This page is under construction** +### Description +The SET command sets a property, returns the value of an existing property or returns all SQLConf properties with value and meaning. + +### Syntax +{% highlight sql %} +SET; +SET [ -v ]; +SET property_key[ =property_value ]; +{% endhighlight %} + +### Parameters +
+
-v
+
Outputs the key, value and meaning of existing SQLConf properties.
+
+ +
+
property_key
+
Returns the value of specified property key.
+
+ +
+
property_key=property_value
+
Sets the value of specified property key.
+
+ +### Examples +{% highlight sql %} +-- Set a property. +SET spark.sql.variable.substitute=false; + +-- List all SQLConf properties with value and meaning. +SET -v; + +-- List all SQLConf properties with value for current session. +SET; + +-- List the value of specified property key. +SET spark.sql.variable.substitute; + +--------------------------------+--------+ + | key | value | + +--------------------------------+--------+ + | spark.sql.variable.substitute | false | + +--------------------------------+--------+ +{% endhighlight %} + +### Related Statements +- [RESET](sql-ref-syntax-aux-conf-mgmt-reset.html) From 9ace7b5fc5f06f5fbc3a5e574a3800c377f946dd Mon Sep 17 00:00:00 2001 From: sharangk Date: Fri, 13 Sep 2019 16:39:59 +0530 Subject: [PATCH 2/4] updated review comments --- docs/sql-ref-syntax-aux-conf-mgmt-reset.md | 2 +- docs/sql-ref-syntax-aux-conf-mgmt-set.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sql-ref-syntax-aux-conf-mgmt-reset.md b/docs/sql-ref-syntax-aux-conf-mgmt-reset.md index 838eeb8e1ce70..97036b47cc57c 100644 --- a/docs/sql-ref-syntax-aux-conf-mgmt-reset.md +++ b/docs/sql-ref-syntax-aux-conf-mgmt-reset.md @@ -30,7 +30,7 @@ RESET ### Examples {% highlight sql %} --- Reset all SQLConf properties to the default values. +-- Reset all the properties specific to the current session to their default values. RESET; {% endhighlight %} diff --git a/docs/sql-ref-syntax-aux-conf-mgmt-set.md b/docs/sql-ref-syntax-aux-conf-mgmt-set.md index 7d3941b69aabd..138a844eb662a 100644 --- a/docs/sql-ref-syntax-aux-conf-mgmt-set.md +++ b/docs/sql-ref-syntax-aux-conf-mgmt-set.md @@ -24,9 +24,9 @@ The SET command sets a property, returns the value of an existing property or re ### Syntax {% highlight sql %} -SET; -SET [ -v ]; -SET property_key[ =property_value ]; +SET +SET [ -v ] +SET property_key[ = property_value ] {% endhighlight %} ### Parameters @@ -42,7 +42,7 @@ SET property_key[ =property_value ];
property_key=property_value
-
Sets the value of specified property key.
+
The new value overrides any existing value for the specified property key.
### Examples From 91e41382ab3d2e4316d5bea6f6e5bb9ed0715d62 Mon Sep 17 00:00:00 2001 From: sharangk Date: Fri, 13 Sep 2019 16:50:20 +0530 Subject: [PATCH 3/4] updated review comments --- docs/sql-ref-syntax-aux-conf-mgmt-reset.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sql-ref-syntax-aux-conf-mgmt-reset.md b/docs/sql-ref-syntax-aux-conf-mgmt-reset.md index 97036b47cc57c..8ee61514ee4ef 100644 --- a/docs/sql-ref-syntax-aux-conf-mgmt-reset.md +++ b/docs/sql-ref-syntax-aux-conf-mgmt-reset.md @@ -20,7 +20,7 @@ license: | --- ### Description -Reset all SQLConf properties to the default values. After RESET command, executing SET command will output empty. +Reset all the properties specific to the current session to their default values. After RESET command, executing SET command will output empty. ### Syntax {% highlight sql %} From 624b1e10a2bb1d62444a13d50e2a238573418d97 Mon Sep 17 00:00:00 2001 From: sharangk Date: Tue, 17 Sep 2019 16:51:04 +0530 Subject: [PATCH 4/4] update message --- docs/sql-ref-syntax-aux-conf-mgmt-set.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sql-ref-syntax-aux-conf-mgmt-set.md b/docs/sql-ref-syntax-aux-conf-mgmt-set.md index 138a844eb662a..f05dde3f567ee 100644 --- a/docs/sql-ref-syntax-aux-conf-mgmt-set.md +++ b/docs/sql-ref-syntax-aux-conf-mgmt-set.md @@ -42,7 +42,7 @@ SET property_key[ = property_value ]
property_key=property_value
-
The new value overrides any existing value for the specified property key.
+
Sets the value for a given property key. If an old value exists for a given property key, then it gets overridden by the new value.
### Examples