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 2018/07/25 19:28:16 UTC

[05/10] impala git commit: IMPALA-5607: Part 1 [DOCS] Return type changes for EXTRACT and DATE_PART

IMPALA-5607: Part 1 [DOCS] Return type changes for EXTRACT and DATE_PART

Change-Id: I0a7b1c2f984aac1d6d84480523d07a4125de1f52
Reviewed-on: http://gerrit.cloudera.org:8080/11044
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Jinchul Kim <ji...@gmail.com>
Reviewed-by: Tim Armstrong <ta...@cloudera.com>


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

Branch: refs/heads/master
Commit: 73be15409a6fffe45b1423e847c0d2e737c186ca
Parents: cdc8b9b
Author: Alex Rodoni <ar...@cloudera.com>
Authored: Tue Jul 24 18:22:37 2018 -0700
Committer: Alex Rodoni <ar...@cloudera.com>
Committed: Wed Jul 25 15:46:12 2018 +0000

----------------------------------------------------------------------
 docs/topics/impala_datetime_functions.xml | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/73be1540/docs/topics/impala_datetime_functions.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_datetime_functions.xml b/docs/topics/impala_datetime_functions.xml
index 7c8d5e1..da52cc8 100644
--- a/docs/topics/impala_datetime_functions.xml
+++ b/docs/topics/impala_datetime_functions.xml
@@ -293,7 +293,7 @@ select date_add(cast('2016-01-31' as timestamp), interval 3 months) as 'april_31
           with the argument order reversed. Supports the same date and time units as <codeph>EXTRACT()</codeph>.
           For compatibility with SQL code containing vendor extensions.
           <p>
-            <b>Return type:</b> <codeph>int</codeph>
+            <b>Return type:</b> <codeph>bigint</codeph>
           </p>
           <p conref="../shared/impala_common.xml#common/example_blurb"/>
 <codeblock>
@@ -816,22 +816,24 @@ select now() as right_now, days_sub(now(), 31) as 31_days_ago;
         <dd>
           <indexterm audience="hidden">extract() function</indexterm>
           <b>Purpose:</b> Returns one of the numeric date or time fields from a
-            <codeph>TIMESTAMP</codeph> value.
-          <p>
+            <codeph>TIMESTAMP</codeph> value. <p>
             <b>Unit argument:</b> The <codeph>unit</codeph> string can be one of
               <codeph>epoch</codeph>, <codeph>year</codeph>,
               <codeph>quarter</codeph>, <codeph>month</codeph>,
               <codeph>day</codeph>, <codeph>hour</codeph>,
               <codeph>minute</codeph>, <codeph>second</codeph>, or
               <codeph>millisecond</codeph>. This argument value is
-            case-insensitive.
-          </p>
-          <p rev="2.0.0"> In Impala 2.0 and higher, you can use special syntax
-            rather than a regular function call, for compatibility with code
-            that uses the SQL-99 format with the <codeph>FROM</codeph> keyword.
-            With this style, the unit names are identifiers rather than
-              <codeph>STRING</codeph> literals. For example, the following calls
-            are both equivalent:
+            case-insensitive. </p><p>If you specify <codeph>millisecond</codeph>
+            for the <codeph>unit</codeph> argument, the function returns the
+            seconds component and the milliseconds component. For example,
+              <codeph>extract(cast('2006-05-12 18:27:28.123456789' as
+              timestamp), 'MILLISECOND')</codeph> will return
+              <codeph>28123</codeph>. </p><p rev="2.0.0"> In Impala 2.0 and
+            higher, you can use special syntax rather than a regular function
+            call, for compatibility with code that uses the SQL-99 format with
+            the <codeph>FROM</codeph> keyword. With this style, the unit names
+            are identifiers rather than <codeph>STRING</codeph> literals. For
+            example, the following calls are both equivalent:
             <codeblock>extract(year from now());
 extract(now(), "year");
 </codeblock>
@@ -847,7 +849,7 @@ extract(now(), "year");
               <codeph>TRUNC()</codeph> function instead. </p>
           <p>
             <b>Return type:</b>
-            <codeph>int</codeph>
+            <codeph>bigint</codeph>
           </p>
           <p conref="../shared/impala_common.xml#common/example_blurb"/>
           <codeblock>