IMPALA-4168: [DOCS] Adds Oracle-style hint placement for INSERT/UPSERT

Change-Id: I43e0a782087c2e67f2e012424fb9261be445efc9
Reviewed-on: http://gerrit.cloudera.org:8080/9030
Reviewed-by: Alex Rodoni <arod...@cloudera.com>
Reviewed-by: Kim Jin Chul <jinc...@gmail.com>
Reviewed-by: John Russell <jruss...@cloudera.com>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/e1123eb1
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/e1123eb1
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/e1123eb1

Branch: refs/heads/2.x
Commit: e1123eb186ddc556bfb8db1d3165b1f287057ffe
Parents: 80e385a
Author: Jinchul <jinc...@gmail.com>
Authored: Tue Jan 16 21:13:43 2018 +0900
Committer: Impala Public Jenkins <impala-public-jenk...@gerrit.cloudera.org>
Committed: Wed Apr 11 22:56:00 2018 +0000

----------------------------------------------------------------------
 docs/topics/impala_hints.xml  | 42 ++++++++++++++++++++++++++++++++++++++
 docs/topics/impala_insert.xml |  9 ++++----
 docs/topics/impala_upsert.xml |  2 +-
 3 files changed, 48 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/e1123eb1/docs/topics/impala_hints.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_hints.xml b/docs/topics/impala_hints.xml
index d489048..6cafcfb 100644
--- a/docs/topics/impala_hints.xml
+++ b/docs/topics/impala_hints.xml
@@ -77,6 +77,12 @@ INSERT <varname>insert_clauses</varname>
   [{ /* +SHUFFLE */ | /* +NOSHUFFLE */ }]
   [<ph rev="IMPALA-2522 2.8.0">/* +CLUSTERED */</ph>]
   SELECT <varname>remainder_of_query</varname>;
+
+<ph rev="2.12.0 IMPALA-4168">
+UPSERT [{ /* +SHUFFLE */ | /* +NOSHUFFLE */ }]
+  [<ph rev="IMPALA-2522 2.8.0">/* +CLUSTERED */</ph>]
+  <varname>upsert_clauses</varname>
+  SELECT <varname>remainder_of_query</varname>;</ph>
 </codeblock>
 
     <p rev="2.0.0">
@@ -112,6 +118,26 @@ INSERT <varname>insert_clauses</varname>
   -- +SHUFFLE|NOSHUFFLE
   SELECT <varname>remainder_of_query</varname>;
 
+<ph rev="2.12.0 IMPALA-4168">
+INSERT /* +SHUFFLE|NOSHUFFLE */
+  <varname>insert_clauses</varname>
+  SELECT <varname>remainder_of_query</varname>;</ph>
+
+<ph rev="2.12.0 IMPALA-4168">
+INSERT -- +SHUFFLE|NOSHUFFLE
+  <varname>insert_clauses</varname>
+  SELECT <varname>remainder_of_query</varname>;</ph>
+
+<ph rev="2.12.0 IMPALA-4168">
+UPSERT /* +SHUFFLE|NOSHUFFLE */
+  <varname>upsert_clauses</varname>
+  SELECT <varname>remainder_of_query</varname>;</ph>
+
+<ph rev="2.12.0 IMPALA-4168">
+UPSERT -- +SHUFFLE|NOSHUFFLE
+  <varname>upsert_clauses</varname>
+  SELECT <varname>remainder_of_query</varname>;</ph>
+
 <ph rev="IMPALA-2924">SELECT <varname>select_list</varname> FROM
 <varname>table_ref</varname>
   /* +{SCHEDULE_CACHE_LOCAL | SCHEDULE_DISK_LOCAL | SCHEDULE_REMOTE}
@@ -125,6 +151,22 @@ INSERT <varname>insert_clauses</varname>
 INSERT <varname>insert_clauses</varname>
   /* +CLUSTERED */
   SELECT <varname>remainder_of_query</varname>;</ph>
+
+<ph rev="2.12.0 IMPALA-4168">INSERT -- +CLUSTERED
+  <varname>insert_clauses</varname>
+  SELECT <varname>remainder_of_query</varname>;
+
+INSERT /* +CLUSTERED */
+  <varname>insert_clauses</varname>
+  SELECT <varname>remainder_of_query</varname>;
+
+UPSERT -- +CLUSTERED
+  <varname>upsert_clauses</varname>
+  SELECT <varname>remainder_of_query</varname>;
+
+UPSERT /* +CLUSTERED */
+  <varname>upsert_clauses</varname>
+  SELECT <varname>remainder_of_query</varname>;</ph>
 </codeblock>
 
     <p conref="../shared/impala_common.xml#common/usage_notes_blurb"/>

http://git-wip-us.apache.org/repos/asf/impala/blob/e1123eb1/docs/topics/impala_insert.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_insert.xml b/docs/topics/impala_insert.xml
index a83692d..3880a70 100644
--- a/docs/topics/impala_insert.xml
+++ b/docs/topics/impala_insert.xml
@@ -49,7 +49,7 @@ under the License.
     <p conref="../shared/impala_common.xml#common/syntax_blurb"/>
 
 <codeblock>[<varname>with_clause</varname>]
-INSERT { INTO | OVERWRITE } [TABLE] <varname>table_name</varname>
+  INSERT <ph rev="2.12.0 IMPALA-4168">[<varname>hint_clause</varname>]</ph> { 
INTO | OVERWRITE } [TABLE] <varname>table_name</varname>
   [(<varname>column_list</varname>)]
   [ PARTITION (<varname>partition_clause</varname>)]
 {
@@ -204,9 +204,10 @@ hint_with_brackets ::= [SHUFFLE] | [NOSHUFFLE]
       </li>
 
       <li rev="1.2.2">
-        An optional hint clause immediately before the <codeph>SELECT</codeph> 
keyword, to fine-tune the behavior
-        when doing an <codeph>INSERT ... SELECT</codeph> operation into 
partitioned Parquet tables. The hint
-        keywords are <codeph>[SHUFFLE]</codeph> and 
<codeph>[NOSHUFFLE]</codeph>, including the square brackets.
+        An optional hint clause immediately either before the 
<codeph>SELECT</codeph> keyword or after the
+        <codeph>INSERT</codeph> keyword, to fine-tune the behavior when doing 
an <codeph>INSERT ... SELECT</codeph>
+        operation into partitioned Parquet tables. The hint clause cannot be 
specified in multiple places.
+        The hint keywords are <codeph>[SHUFFLE]</codeph> and 
<codeph>[NOSHUFFLE]</codeph>, including the square brackets.
         Inserting into partitioned Parquet tables can be a resource-intensive 
operation because it potentially
         involves many files being written to HDFS simultaneously, and separate
         <ph rev="parquet_block_size">large</ph> memory buffers being allocated 
to buffer the data for each

http://git-wip-us.apache.org/repos/asf/impala/blob/e1123eb1/docs/topics/impala_upsert.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_upsert.xml b/docs/topics/impala_upsert.xml
index 5830675..a95b0f8 100644
--- a/docs/topics/impala_upsert.xml
+++ b/docs/topics/impala_upsert.xml
@@ -68,7 +68,7 @@ under the License.
     <p conref="../shared/impala_common.xml#common/syntax_blurb"/>
 
 <codeblock>
-UPSERT INTO [TABLE] [<varname>db_name</varname>.]<varname>table_name</varname>
+UPSERT <ph rev="2.12.0 IMPALA-4168">[<varname>hint_clause</varname>]</ph> INTO 
[TABLE] [<varname>db_name</varname>.]<varname>table_name</varname>
   [(<varname>column_list</varname>)]
 {
     [<varname>hint_clause</varname>] <varname>select_statement</varname>

Reply via email to