Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion docs/sql-ref-syntax-aux-conf-mgmt-reset.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we say "Reset all the properties specific to the current session to their default values" ? I would like to remove SQLConf as even non sql properties are being cleared.


### Syntax
{% highlight sql %}
RESET
{% endhighlight %}


### Examples
{% highlight sql %}
-- Reset all the properties specific to the current session to their default values.
RESET;
{% endhighlight %}

### Related Statements
- [SET](sql-ref-syntax-aux-conf-mgmt-set.html)
49 changes: 48 additions & 1 deletion docs/sql-ref-syntax-aux-conf-mgmt-set.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<dl>
<dt><code><em>-v</em></code></dt>
<dd>Outputs the key, value and meaning of existing SQLConf properties.</dd>
</dl>

<dl>
<dt><code><em>property_key</em></code></dt>
<dd>Returns the value of specified property key.</dd>
</dl>

<dl>
<dt><code><em>property_key=property_value</em></code></dt>
<dd>The new value overrides any existing value for the specified property key.</dd>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sharangk This makes it sound like it only supports a update op ? How about the following ?

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks.

</dl>

### 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)