You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ya...@apache.org on 2020/04/23 06:05:10 UTC

[spark] branch branch-3.0 updated: [SPARK-31465][SQL][DOCS][FOLLOW-UP] Document Literal in SQL Reference

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

yamamuro pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 0f02997  [SPARK-31465][SQL][DOCS][FOLLOW-UP] Document Literal in SQL Reference
0f02997 is described below

commit 0f0299749421bc7328c6b962a9305bf460f51ddf
Author: Huaxin Gao <hu...@us.ibm.com>
AuthorDate: Thu Apr 23 15:03:20 2020 +0900

    [SPARK-31465][SQL][DOCS][FOLLOW-UP] Document Literal in SQL Reference
    
    ### What changes were proposed in this pull request?
    Need to address a few more comments
    
    ### Why are the changes needed?
    Fix a few problems
    
    ### Does this PR introduce any user-facing change?
    Yes
    
    ### How was this patch tested?
    Manually build and check
    
    Closes #28306 from huaxingao/literal-folllowup.
    
    Authored-by: Huaxin Gao <hu...@us.ibm.com>
    Signed-off-by: Takeshi Yamamuro <ya...@apache.org>
    (cherry picked from commit f543d6a1ee76de8cae417ff480fa9c0e0ce5343d)
    Signed-off-by: Takeshi Yamamuro <ya...@apache.org>
---
 docs/sql-ref-literals.md | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/docs/sql-ref-literals.md b/docs/sql-ref-literals.md
index 7cf078c..0088f79 100644
--- a/docs/sql-ref-literals.md
+++ b/docs/sql-ref-literals.md
@@ -437,11 +437,11 @@ SELECT TIMESTAMP '1997-01-31 09:26:56.123' AS col;
 |1997-01-31 09:26:56.123|
 +-----------------------+
 
-SELECT TIMESTAMP '1997-01-31 09:26:56.66666666CST' AS col;
+SELECT TIMESTAMP '1997-01-31 09:26:56.66666666UTC+08:00' AS col;
 +--------------------------+
 |                      col |
 +--------------------------+
-|1997-01-31 07:26:56.666666|
+|1997-01-30 17:26:56.666666|
 +--------------------------+
 
 SELECT TIMESTAMP '1997-01' AS col;
@@ -508,7 +508,7 @@ SELECT INTERVAL -2 HOUR '3' MINUTE AS col;
 |-1 hours -57 minutes|
 +--------------------+
 
-SELECT INTERVAL 'INTERVAL 1 YEAR 2 DAYS 3 HOURS';
+SELECT INTERVAL '1 YEAR 2 DAYS 3 HOURS';
 +----------------------+
 |                   col|
 +----------------------+
@@ -523,6 +523,13 @@ SELECT INTERVAL 1 YEARS 2 MONTH 3 WEEK 4 DAYS 5 HOUR 6 MINUTES 7 SECOND 8
 |1 years 2 months 25 days 5 hours 6 minutes 7.008009 seconds|
 +-----------------------------------------------------------+
 
+SELECT INTERVAL '2-3' YEAR TO MONTH AS col;
++----------------+
+|             col|
++----------------+
+|2 years 3 months|
++----------------+
+
 SELECT INTERVAL '20 15:40:32.99899999' DAY TO SECOND AS col;
 +---------------------------------------------+
 |                                          col|


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org