Browse Source

SQL: [Docs] Fix doc errors regarding CURRENT_DATE. (#40649)

Some parts wrongly refered to CURRENT_TIMESTAMP.
Marios Trivyzas 6 years ago
parent
commit
3dd0384d68

+ 7 - 1
docs/reference/sql/functions/date-time.asciidoc

@@ -99,6 +99,7 @@ Functions that target date/time.
 --------------------------------------------------
 CURRENT_DATE
 CURRENT_DATE()
+CURDATE()
 --------------------------------------------------
 
 *Input*: _none_
@@ -117,7 +118,12 @@ This method always returns the same value for its every occurrence within the sa
 
 ["source","sql",subs="attributes,callouts,macros"]
 --------------------------------------------------
-include-tagged::{sql-specs}/docs/docs.csv-spec[curDate]
+include-tagged::{sql-specs}/docs/docs.csv-spec[currentDate]
+--------------------------------------------------
+
+["source","sql",subs="attributes,callouts,macros"]
+--------------------------------------------------
+include-tagged::{sql-specs}/docs/docs.csv-spec[currentDateFunction]
 --------------------------------------------------
 
 ["source","sql",subs="attributes,callouts,macros"]

+ 14 - 4
x-pack/plugin/sql/qa/src/main/resources/docs/docs.csv-spec

@@ -2359,18 +2359,28 @@ SELECT WEEK(CAST('1988-01-05T09:22:10Z' AS TIMESTAMP)) AS week, ISOWEEK(CAST('19
 
 
 currentDate-Ignore
-// tag::curDate
-SELECT CURRENT_TIMESTAMP AS result;
+// tag::currentDate
+SELECT CURRENT_DATE AS result;
 
          result
 ------------------------
 2018-12-12
-// end::curDate
+// end::currentDate
 ;
 
 currentDateFunction-Ignore
+// tag::currentDateFunction
+SELECT CURRENT_DATE() AS result;
+
+         result
+------------------------
+2018-12-12
+// end::currentDateFunction
+;
+
+curDateFunction-Ignore
 // tag::curDateFunction
-SELECT CURRENT_TIMESTAMP() AS result;
+SELECT CURRENT_DATE() AS result;
 
          result
 ------------------------