You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by br...@apache.org on 2018/12/11 00:30:15 UTC

[drill] branch gh-pages updated: edits per DRILL-6790

This is an automated email from the ASF dual-hosted git repository.

bridgetb pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/drill.git


The following commit(s) were added to refs/heads/gh-pages by this push:
     new 6026524  edits per DRILL-6790
6026524 is described below

commit 60265244e0e1c31e619daefd442b64a1557cf279
Author: Bridget Bevens <bb...@maprtech.com>
AuthorDate: Mon Dec 10 16:29:20 2018 -0800

    edits per DRILL-6790
---
 _docs/sql-reference/sql-commands/010-set.md | 81 +++++++++++++++--------------
 1 file changed, 43 insertions(+), 38 deletions(-)

diff --git a/_docs/sql-reference/sql-commands/010-set.md b/_docs/sql-reference/sql-commands/010-set.md
index af780df..c852ee9 100644
--- a/_docs/sql-reference/sql-commands/010-set.md
+++ b/_docs/sql-reference/sql-commands/010-set.md
@@ -1,9 +1,9 @@
 ---
 title: "SET"
-date: 2018-11-02
+date: 2018-12-11
 parent: "SQL Commands"
 ---
-The SET command replaces the ALTER SESSION SET command in Drill version 1.3 and later. The SET command changes a system setting for the duration of a session. Session level settings override system level settings.
+Starting in Drill 1.3, the SET command replaces the ALTER SESSION SET command. The SET command changes a system setting for the duration of a session. Session level settings override system level settings.
 
 ## Syntax
 
@@ -14,54 +14,59 @@ The SET command supports the following syntax:
 ## Parameters
 
 *option_name*  
-This is the option name as it appears in the systems table.
+This is the option name as it appears in the options table that is stored in the sys database (schema).
 
 *value*  
-A value of the type listed in the sys.options table: number, string, boolean,
+A value of the type listed in the val column of the sys.options table: number, string, boolean,
 or float. Use the appropriate value type for each option that you set.
 
-## Usage Notes
-You can still use the ALTER SESSION SET command, however ALTER SESSION is now just an alias for the SET command. Use the SET command to change Drill query planning and execution
-options per session in a cluster. The options that you set only apply to queries that run during the current Drill connection. A session ends when you quit the Drill shell. You can set any of the system level options at the session level. You can use the [RESET]({{site.baseurl}}/docs/reset) command to change the value of an option back to the default system setting.
+## Usage Notes  
 
-You can run the following query to see a complete list of planning and
-execution options that are currently set at the system or session level:
+- You can still use the ALTER SESSION SET command; however, ALTER SESSION is now just an alias for the SET command.
+- Use the SET command to change Drill query planning and execution options per session in a cluster. 
+- The options that you set only apply to queries that run during the current Drill connection. 
+- A session ends when you quit the Drill shell. 
+- You can set any of the system level options at the session level. 
+- Use the [RESET]({{site.baseurl}}/docs/reset) command to change the value of an option back to the default system setting.
 
-    0: jdbc:drill:zk=local> SELECT name, type FROM sys.options WHERE type in ('SYSTEM','SESSION') order by name;
-    +------------+------------------------------------------------+
-    |   name                                         |    type    |
-    +----------------------------------------------+--------------+
-    | drill.exec.functions.cast_empty_string_to_null | SYSTEM     |
-    | drill.exec.storage.file.partition.column.label | SYSTEM     |
-    | exec.errors.verbose                            | SYSTEM     |
-    | exec.java_compiler                             | SYSTEM     |
-    | exec.java_compiler_debug                       | SYSTEM     |
-    …
-    +------------+------------------------------------------------+
+The following query returns the planning and execution options that are currently set at the system level:
 
-{% include startnote.html %}This is a truncated version of the list.{% include endnote.html %}
+    SELECT * FROM sys.options WHERE optionScope IN ('SYSTEM') ORDER BY name;
+	+-------------------------------------------+---------+-------------------+-------------+----------+--------------+----------------------------------------------------------------------------------+
+	|                   name                    |  kind   | accessibleScopes  |     val     |  status  | optionScope  |                                   description                                    |
+	+-------------------------------------------+---------+-------------------+-------------+----------+--------------+----------------------------------------------------------------------------------+
+	| debug.validate_iterators                  | BIT     | ALL               | true        | CHANGED  | SYSTEM       |                                                                                  |
+	| exec.query.progress.update                | BIT     | ALL               | false       | CHANGED  | SYSTEM       |                                                                                  |
+	| planner.memory.max_query_memory_per_node  | BIGINT  | ALL               | 2147483750  | CHANGED  | SYSTEM       | Sets the maximum amount of direct memory allocated to the Sort and Hash Aggregate operators during each que... |
+	+-------------------------------------------+---------+-------------------+-------------+----------+--------------+----------------------------------------------------------------------------------+   
+ 
+## Examples
 
-## Example
+This example demonstrates how to use the SET command to set the `store.json.all_text_mode` option to “true” for the current Drill session.
+Setting this option to “true” enables text mode so that Drill reads everything in JSON as a text object instead of trying to interpret data types. 
 
-This example demonstrates how to use the SET command to set the
-`store.json.all_text_mode` option to “true” for the current Drill session.
-Setting this option to “true” enables text mode so that Drill reads everything
-in JSON as a text object instead of trying to interpret data types. This
-allows complicated JSON to be read using CASE and CAST.
-
-       0: jdbc:drill:zk=local> SET `store.json.all_text_mode`= true;
+       SET `store.json.all_text_mode`= true;
        +-------+------------------------------------+
        |  ok   |              summary               |
        +-------+------------------------------------+
        | true  | store.json.all_text_mode updated.  |
        +-------+------------------------------------+
        
-You can issue a query to see options set at the session level. Note that the
-option type is case-sensitive.
-
-       0: jdbc:drill:zk=local> SELECT name, type, bool_val FROM sys.options WHERE type = 'SESSION' order by name; 
-       +---------------------------+----------+-----------+
-       |           name            |   type   | bool_val  |
-       +---------------------------+----------+-----------+
-       | store.json.all_text_mode  | SESSION  | true      |
-       +---------------------------+----------+-----------+    
+**Note:** Drill reads complicated JSON using CASE and CAST.  
+
+The following query returns the planning and execution options currently set at the session level after changing the value of the `debug.validate_iterators` option to "false": 
+
+ 	SET `debug.validate_iterators` = false;
+	+-------+------------------------------------+
+	|  ok   |              summary               |
+	+-------+------------------------------------+
+	| true  | debug.validate_iterators updated.  |
+	+-------+------------------------------------+
+
+
+ 	SELECT * FROM sys.options WHERE optionScope IN ('SESSION') ORDER BY name;
+	+---------------------------+-------+-------------------+--------+----------+--------------+--------------+
+	|           name            | kind  | accessibleScopes  |  val   |  status  | optionScope  | description  |
+	+---------------------------+-------+-------------------+--------+----------+--------------+--------------+
+	| debug.validate_iterators  | BIT   | ALL               | false  | DEFAULT  | SESSION      |              |
+	+---------------------------+-------+-------------------+--------+----------+--------------+--------------+  
\ No newline at end of file