You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ar...@apache.org on 2019/07/23 23:10:11 UTC

[impala] branch master updated (2813d0c -> 1f4e89e)

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

arodoni pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git.


    from 2813d0c  [DOCS] Format changes
     new 55e5228  IMPALA-8746: [DOCS] Document the DEFAULT_HINTS_INSERT_STATEMENT query option
     new 1c9af2c  IMPALA-8701: [DOCS] Document --idle_client_poll_time_s flag
     new 1f4e89e  IMPALA-8765: [DOCS] Document the GET_JSON_OBJECT function

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/impala.ditamap                                |   1 +
 docs/topics/impala_client.xml                      |  32 ++++++
 ...l => impala_default_hints_insert_statement.xml} |  38 +++---
 docs/topics/impala_functions.xml                   |   7 ++
 docs/topics/impala_langref_unsupported.xml         |   4 +-
 docs/topics/impala_misc_functions.xml              | 127 +++++++++++++++++----
 6 files changed, 169 insertions(+), 40 deletions(-)
 copy docs/topics/{impala_num_rows_produced_limit.xml => impala_default_hints_insert_statement.xml} (55%)


[impala] 01/03: IMPALA-8746: [DOCS] Document the DEFAULT_HINTS_INSERT_STATEMENT query option

Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

arodoni pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 55e52287e7d8fb9f3a22a70c26627eabdcaa48d0
Author: Alex Rodoni <ar...@cloudera.com>
AuthorDate: Fri Jul 19 15:06:29 2019 -0700

    IMPALA-8746: [DOCS] Document the DEFAULT_HINTS_INSERT_STATEMENT query option
    
    Change-Id: Ia376721f46eb507901f9f64b5c3341dc0f36475b
    Reviewed-on: http://gerrit.cloudera.org:8080/13885
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
    Reviewed-by: Bharath Vissapragada <bh...@cloudera.com>
---
 docs/impala.ditamap                                |  1 +
 .../impala_default_hints_insert_statement.xml      | 81 ++++++++++++++++++++++
 2 files changed, 82 insertions(+)

diff --git a/docs/impala.ditamap b/docs/impala.ditamap
index 306263f..5e3bae1 100644
--- a/docs/impala.ditamap
+++ b/docs/impala.ditamap
@@ -179,6 +179,7 @@ under the License.
           <topicref href="topics/impala_debug_action.xml"/>
           <topicref rev="2.9.0" href="topics/impala_decimal_v2.xml"/>
           <topicref rev="3.2.0" href="topics/impala_default_file_format.xml"/>
+          <topicref rev="3.3.0" href="topics/impala_default_hints_insert_statement.xml"/>
           <topicref rev="2.9.0 IMPALA-5381" href="topics/impala_default_join_distribution_mode.xml"/>
           <topicref rev="2.10.0 IMPALA-3200" href="topics/impala_default_spillable_buffer_size.xml"/>
           <topicref href="topics/impala_disable_codegen.xml"/>
diff --git a/docs/topics/impala_default_hints_insert_statement.xml b/docs/topics/impala_default_hints_insert_statement.xml
new file mode 100644
index 0000000..ef2584f
--- /dev/null
+++ b/docs/topics/impala_default_hints_insert_statement.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
+<concept id="default_hints_insert_statement">
+
+  <title>DEFAULT_HINTS_INSERT_STATEMENT Query Option</title>
+
+  <titlealts audience="PDF">
+
+    <navtitle>DEFAULT_HINTS_INSERT_STATEMENT</navtitle>
+
+  </titlealts>
+
+  <prolog>
+    <metadata>
+      <data name="Category" value="Impala"/>
+      <data name="Category" value="Impala Query Options"/>
+    </metadata>
+  </prolog>
+
+  <conbody>
+
+    <p>
+      The <codeph>DEFAULT_HINTS_INSERT_STATEMENT</codeph> query option sets the default hints
+      for the <codeph>INSERT</codeph> statements with no optimizer hint specified.
+    </p>
+
+    <p>
+      When there are hints specified in an <codeph>INSERT</codeph> statement, these default
+      hints are ignored.
+    </p>
+
+    <p>
+      You can specify multiple hints separated by '<codeph>:</codeph>'.
+    </p>
+
+    <p>
+      For example:
+    </p>
+
+<codeblock>SET DEFAULT_HINTS_INSERT_STATEMENT=CLUSTERED;
+SET DEFAULT_HINTS_INSERT_STATEMENT=SHUFFLE;
+SET DEFAULT_HINTS_INSERT_STATEMENT=NOCLUSTERED:NOSHUFFLE; </codeblock>
+
+    <p>
+      The default hints apply to the HDFS and Kudu table formats and are ignored for the HBase
+      table format.
+    </p>
+
+    <p>
+      <b>Type:</b> <codeph>STRING</codeph>
+    </p>
+
+    <p>
+      <b>Default:</b> none
+    </p>
+
+    <p>
+      <b>Added in:</b> <keyword keyref="impala33"/>
+    </p>
+
+  </conbody>
+
+</concept>


[impala] 03/03: IMPALA-8765: [DOCS] Document the GET_JSON_OBJECT function

Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

arodoni pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 1f4e89e66ed45cb28dfa2c98023464621b3ee7ab
Author: Alex Rodoni <ar...@cloudera.com>
AuthorDate: Fri Jul 19 16:53:45 2019 -0700

    IMPALA-8765: [DOCS] Document the GET_JSON_OBJECT function
    
    Change-Id: I7135528e84f685bfe1c32d81f4cedb6afc133e04
    Reviewed-on: http://gerrit.cloudera.org:8080/13886
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
    Reviewed-by: Quanlong Huang <hu...@gmail.com>
---
 docs/topics/impala_functions.xml           |   7 ++
 docs/topics/impala_langref_unsupported.xml |   4 +-
 docs/topics/impala_misc_functions.xml      | 127 +++++++++++++++++++++++------
 3 files changed, 112 insertions(+), 26 deletions(-)

diff --git a/docs/topics/impala_functions.xml b/docs/topics/impala_functions.xml
index 724253b..255a1da 100644
--- a/docs/topics/impala_functions.xml
+++ b/docs/topics/impala_functions.xml
@@ -514,6 +514,13 @@ under the License.
           </row>
           <row>
             <entry>
+              <xref
+                href="impala_misc_functions.xml#misc_functions/get_json_object"
+                >GET_JSON_OBJECT</xref>
+            </entry>
+          </row>
+          <row>
+            <entry>
               <xref href="impala_bit_functions.xml#bit_functions/getbit"
                 >GETBIT</xref>
             </entry>
diff --git a/docs/topics/impala_langref_unsupported.xml b/docs/topics/impala_langref_unsupported.xml
index a7b7d65..9746827 100644
--- a/docs/topics/impala_langref_unsupported.xml
+++ b/docs/topics/impala_langref_unsupported.xml
@@ -83,9 +83,7 @@ under the License.
           The <codeph>DATE</codeph> data type.
         </li>
 
-        <li>
-          XML and JSON functions.
-        </li>
+        <li> XML functions. </li>
 
         <li>
           Certain aggregate functions from HiveQL: <codeph>covar_pop</codeph>, <codeph>covar_samp</codeph>,
diff --git a/docs/topics/impala_misc_functions.xml b/docs/topics/impala_misc_functions.xml
index a31c838..d10b98c 100644
--- a/docs/topics/impala_misc_functions.xml
+++ b/docs/topics/impala_misc_functions.xml
@@ -56,6 +56,11 @@ under the License.
       </li>
 
       <li>
+        <xref href="#misc_functions/get_json_object"
+        >GET_JSON_OBJECT</xref>
+      </li>
+
+      <li>
         <xref href="#misc_functions/logged_in_user">LOGGED_IN_USER</xref>
       </li>
 
@@ -123,6 +128,96 @@ under the License.
 
       </dlentry>
 
+      <dlentry id="get_json_object">
+
+        <dt>
+          GET_JSON_OBJECT(STRING json_str, STRING selector)
+        </dt>
+
+        <dd>
+          <b>Purpose:</b> Extracts JSON object from the <varname>json_str</varname> based on the
+          <varname>selector</varname> JSON path and returns the string of the extracted JSON
+          object.
+          <p>
+            The function returns <codeph>NULL</codeph> if the input <varname>json_str</varname>
+            is invalid or if nothing is selected based on the <varname>selector</varname> JSON
+            path.
+          </p>
+
+          <p>
+            The following characters are supported in the <varname>selector</varname> JSON path:
+            <ul>
+              <li>
+                $ : Denotes the root object
+              </li>
+
+              <li>
+                . : Denotes the child operator
+              </li>
+
+              <li>
+                [] : Denotes the subscript operator for array
+              </li>
+
+              <li>
+                * : Denotes the wildcard for [] or .
+              </li>
+            </ul>
+          </p>
+
+          <p>
+            <b>Return type:</b> <codeph>STRING</codeph>
+          </p>
+
+          <p>
+            <b>Examples:</b>
+          </p>
+<codeblock>---- QUERY
+SELECT GET_JSON_OBJECT ('{"a":true, "b":false, "c":true}', '$.*');
+---- RESULTS
+[true,false,true]</codeblock>
+<codeblock>---- QUERY
+SELECT GET_JSON_OBJECT(t.json, '$.a.b.c') FROM (VALUES (
+ ('{"a": {"b": {"c": 1}}}' AS json),
+ ('{"a": {"b": {"c": 2}}}'),
+ ('{"a": {"b": {"c": 3}}}')
+)) t
+---- RESULTS
+'1'
+'2'
+'3'</codeblock>
+<codeblock>---- QUERY
+SELECT GET_JSON_OBJECT(t.json, '$.a'),
+ GET_JSON_OBJECT(t.json, '$.b'),
+ GET_JSON_OBJECT(t.json, '$.c')
+FROM (VALUES (
+ ('{"a":1, "b":2, "c":3}' AS json),
+ ('{"b":2, "c":3}'),
+ ('{"c":3}')
+)) t
+---- RESULTS
+'1','2','3'
+'NULL','2','3'
+'NULL','NULL','3'</codeblock>
+<codeblock>---- QUERY
+SELECT GET_JSON_OBJECT(t.json, '$[1]'),
+ GET_JSON_OBJECT(t.json, '$[*]')
+FROM (VALUES (
+ ('["a", "b", "c"]' AS json),
+ ('["a", "b"]'),
+ ('["a"]')
+)) t
+---- RESULTS
+'b','["a","b","c"]'
+'b','["a","b"]'
+'NULL','a'</codeblock>
+          <p>
+            <b>Added in:</b> <keyword keyref="impala31"/>
+          </p>
+        </dd>
+
+      </dlentry>
+
       <dlentry rev="3.1" id="logged_in_user">
 
         <dt>
@@ -230,6 +325,15 @@ under the License.
           unique identifier</xref>, a 128-bit value encoded as a string with groups of
           hexadecimal digits separated by dashes.
           <p>
+            Each call to <codeph>UUID()</codeph> produces a new arbitrary value.
+          </p>
+
+          <p>
+            If you get a UUID for each row of a result set, you can use it as a unique
+            identifier within a table, or even a unique ID across tables.
+          </p>
+
+          <p>
             <b>Return type:</b> <codeph>STRING</codeph>
           </p>
 
@@ -245,29 +349,6 @@ under the License.
             quickly construct new unique identifiers during a data import job, or to combine
             data from different tables without the likelihood of ID collisions.
           </p>
-
-          <p conref="../shared/impala_common.xml#common/example_blurb"/>
-<codeblock>
--- Each call to uuid() produces a new arbitrary value.
-select uuid();
-+--------------------------------------+
-| uuid()                               |
-+--------------------------------------+
-| c7013e25-1455-457f-bf74-a2046e58caea |
-+--------------------------------------+
-
--- If you get a UUID for each row of a result set, you can use it as a
--- unique identifier within a table, or even a unique ID across tables.
-select uuid() from four_row_table;
-+--------------------------------------+
-| uuid()                               |
-+--------------------------------------+
-| 51d3c540-85e5-4cb9-9110-604e53999e2e |
-| 0bb40071-92f6-4a59-a6a4-60d46e9703e2 |
-| 5e9d7c36-9842-4a96-862d-c13cd0457c02 |
-| cae29095-0cc0-4053-a5ea-7fcd3c780861 |
-+--------------------------------------+
-</codeblock>
         </dd>
 
       </dlentry>


[impala] 02/03: IMPALA-8701: [DOCS] Document --idle_client_poll_time_s flag

Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

arodoni pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 1c9af2cb526b038c080f1b09acc403e8d7378364
Author: Alex Rodoni <ar...@cloudera.com>
AuthorDate: Mon Jul 22 16:28:32 2019 -0700

    IMPALA-8701: [DOCS] Document --idle_client_poll_time_s flag
    
    Change-Id: I32ace786904f564b9c5fa3ed594e2b679b76d5c6
    Reviewed-on: http://gerrit.cloudera.org:8080/13896
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
    Reviewed-by: Michael Ho <kw...@cloudera.com>
---
 docs/topics/impala_client.xml | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/docs/topics/impala_client.xml b/docs/topics/impala_client.xml
index 93987e1..802ed88 100644
--- a/docs/topics/impala_client.xml
+++ b/docs/topics/impala_client.xml
@@ -133,6 +133,38 @@ under the License.
           </dd>
 
         </dlentry>
+
+        <dlentry>
+
+          <dt>
+            --idle_client_poll_time_s
+          </dt>
+
+          <dd>
+            The value of this setting specifies how frequently Impala polls to check if a client
+            connection is idle and closes it if the connection is idle. A client connection is
+            idle if all sessions associated with the client connection are idle.
+            <p>
+              By default, <codeph>--idle_client_poll_time_s</codeph> is set to 30 seconds.
+            </p>
+
+            <p>
+              If <codeph>--idle_client_poll_time_s</codeph> is set to 0, idle client connections
+              stay open until explicitly closed by the clients.
+            </p>
+
+            <p>
+              The connection will only be closed if all the associated sessions are idle or
+              closed. Sessions cannot be idle unless either the flag
+              <codeph>--idle_session_timeout</codeph> or the
+              <codeph>IDLE_SESSION_TIMEOUT</codeph> query option is set to greater than 0. If
+              idle session timeout is not configured, a session cannot become idle by
+              definition, and therefore its connection stays open until the client explicitly
+              closes it.
+            </p>
+          </dd>
+
+        </dlentry>
       </dl>
 
     </section>