Repository: impala
Updated Branches:
  refs/heads/master e38715e25 -> df53ec238


IMPALA-7546: [DOCS] A new TIMEZONE query option

Documented the new TIMEZONE query option to set a time TIMEZONE
to be used in timestamp conversions.

Change-Id: I734b8b37ae2360422fce269ed87507a04e8c05ac
Reviewed-on: http://gerrit.cloudera.org:8080/11505
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Reviewed-by: Csaba Ringhofer <csringho...@cloudera.com>


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

Branch: refs/heads/master
Commit: 17bc980d9540b29a1667841b7bffc2084204ac35
Parents: e38715e
Author: Alex Rodoni <arod...@cloudera.com>
Authored: Mon Sep 24 17:16:10 2018 -0700
Committer: Alex Rodoni <arod...@cloudera.com>
Committed: Tue Sep 25 19:42:59 2018 +0000

----------------------------------------------------------------------
 docs/impala.ditamap             |   1 +
 docs/topics/impala_timezone.xml | 119 +++++++++++++++++++++++++++++++++++
 2 files changed, 120 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/17bc980d/docs/impala.ditamap
----------------------------------------------------------------------
diff --git a/docs/impala.ditamap b/docs/impala.ditamap
index ce88c01..213d2c9 100644
--- a/docs/impala.ditamap
+++ b/docs/impala.ditamap
@@ -235,6 +235,7 @@ under the License.
           <topicref href="topics/impala_sync_ddl.xml"/>
           <topicref 
href="topics/impala_thread_reservation_aggregate_limit.xml"/>
           <topicref href="topics/impala_thread_reservation_limit.xml"/>
+          <topicref href="topics/impala_timezone.xml"/>
         </topicref>
       </topicref>
       <topicref href="topics/impala_show.xml"/>

http://git-wip-us.apache.org/repos/asf/impala/blob/17bc980d/docs/topics/impala_timezone.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_timezone.xml b/docs/topics/impala_timezone.xml
new file mode 100644
index 0000000..ced9475
--- /dev/null
+++ b/docs/topics/impala_timezone.xml
@@ -0,0 +1,119 @@
+<?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 rev="3.1.0" id="timezone">
+
+  <title>TIMEZONE Query Option (<keyword keyref="impala31_full"/> or higher 
only)</title>
+
+  <titlealts audience="PDF">
+
+    <navtitle>TIMEZONE</navtitle>
+
+  </titlealts>
+
+  <prolog>
+    <metadata>
+      <data name="Category" value="Impala"/>
+      <data name="Category" value="Impala Query Options"/>
+      <data name="Category" value="Querying"/>
+      <data name="Category" value="Developers"/>
+      <data name="Category" value="Data Analysts"/>
+    </metadata>
+  </prolog>
+
+  <conbody>
+
+    <p>
+      The <codeph>TIMEZONE</codeph> query option defines the timezone used for 
conversions
+      between UTC and the local time. If not set, Impala uses the system time 
zone where the
+      Coordinator Impalad runs. As query options are not sent to the 
Coordinator immediately,
+      the timezones are validated only when the query runs.
+    </p>
+
+    <p>
+      Impala takes the timezone into a consideration in the following cases:
+      <ul>
+        <li>
+          When calling the <codeph>NOW()</codeph> function
+        </li>
+
+        <li>
+          When converting between Unix time and timestamp if the
+          <codeph>use_local_tz_for_unix_timestamp_conversions</codeph> flag is
+          <codeph>TRUE</codeph>
+        </li>
+
+        <li>
+          When reading Parquet timestamps written by Hive if the
+          <codeph>convert_legacy_hive_parquet_utc_timestamps</codeph> flag is
+          <codeph>TRUE</codeph>
+        </li>
+      </ul>
+    </p>
+
+    <p>
+      <b>Syntax:</b>
+    </p>
+
+<codeblock>SET TIMEZONE=<varname>time zone</varname></codeblock>
+
+    <p>
+      <varname>time zone</varname> can be a canonical code or a time zone name 
defined in
+      <xref
+        href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones";
+        format="html" scope="external">IANA
+      Time Zone Database</xref>. The value is case-sensitive.
+    </p>
+
+    <p>
+      Leading/trailing quotes (') and double quotes (") are stripped.
+    </p>
+
+    <p>
+      If <varname>time zone</varname> is an empty string, the time zone for 
the query is set to
+      the default time zone of the Impalad Coordinator.
+    </p>
+
+    <p>
+      If <varname>time zone</varname> is <codeph>NULL</codeph> or a space 
character, Impala
+      returns an error when the query is executed.
+    </p>
+
+    <p>
+      <b>Type:</b> String
+    </p>
+
+    <p>
+      <b>Default:</b> The system time zone where the Coordinator Impalad runs
+    </p>
+
+    <p>
+      <b>Examples:</b>
+<codeblock>SET TIMEZONE=UTC;
+SET TIMEZONE="Europe/Budapest";</codeblock>
+    </p>
+
+    <p>
+      <b>Added in:</b> <keyword keyref="impala31"/>
+    </p>
+
+  </conbody>
+
+</concept>

Reply via email to