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

dzamo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 01078c05c Document new TO_TIMESTAMP form and EXTRACT units.
01078c05c is described below

commit 01078c05cbe996296d300304073d72c6b5f5db1a
Author: James Turton <[email protected]>
AuthorDate: Fri Mar 3 16:23:24 2023 +0200

    Document new TO_TIMESTAMP form and EXTRACT units.
---
 .../plugins/040-file-system-storage-plugin.md      | 14 +++++------
 .../sql-functions/020-data-type-conversion.md      | 29 +++++++++++++++-------
 .../030-date-time-functions-and-arithmetic.md      |  4 +--
 3 files changed, 29 insertions(+), 18 deletions(-)

diff --git 
a/_docs/en/connect-a-data-source/plugins/040-file-system-storage-plugin.md 
b/_docs/en/connect-a-data-source/plugins/040-file-system-storage-plugin.md
index 0eea05ce0..8d730ff2a 100644
--- a/_docs/en/connect-a-data-source/plugins/040-file-system-storage-plugin.md
+++ b/_docs/en/connect-a-data-source/plugins/040-file-system-storage-plugin.md
@@ -101,14 +101,14 @@ full file path name to the `donuts.json` file:
 
     SELECT * FROM dfs.`/users/max/drill/json/donuts.json` WHERE type='frosted';
 
+## Mount and unmount commands
+
+**Introduced in release: 1.21**
+
+drill.exec.storage.file.enable_mount_commands
+
 ## Configuration options in core-site.xml
 
 ### drill.exec.recursive_file_listing_max_size
 
-Use this property to set a limit on the numer of files that Drill
-will list by recursing into a DFS directory tree. When the limit is
-encountered the initiating operation will fail with an error. The
-intended application of this limit is to allow admins to protect their
-Drillbits from an errant or malicious SELECT * FROM dfs.huge_workspace
-LIMIT 10 query, which will cause an OOM given a big enough workspace of
-files. Defaults to 0 which means no limit.
+Use this property to set a limit on the numer of files that Drill will list by 
recursing into a DFS directory tree. When the limit is encountered the 
initiating operation will fail with an error. The intended application of this 
limit is to allow admins to protect their Drillbits from an errant or malicious 
`SELECT * FROM dfs.huge_workspace LIMIT 10` query, which will cause an OOM 
given a big enough workspace of files. Defaults to 0 which means no limit.
diff --git a/_docs/en/sql-reference/sql-functions/020-data-type-conversion.md 
b/_docs/en/sql-reference/sql-functions/020-data-type-conversion.md
index fa51a4673..c1097a8b7 100644
--- a/_docs/en/sql-reference/sql-functions/020-data-type-conversion.md
+++ b/_docs/en/sql-reference/sql-functions/020-data-type-conversion.md
@@ -557,13 +557,13 @@ If you have dates and times in other formats, use a data 
type conversion functio
 The following table lists data type formatting functions that you can
 use in your Drill queries as described in this section:
 
-| Function                                                                     
                    | Return Type |
-|--------------------------------------------------------------------------------------------------|-------------|
-| [TO_CHAR]({{site.baseurl}}/docs/data-type-conversion/#to_char)(expression, 
format)               | VARCHAR     |
-| [TO_DATE]({{site.baseurl}}/docs/data-type-conversion/#to_date)(expression, 
format)               | DATE        |
-| [TO_NUMBER]({{site.baseurl}}/docs/data-type-conversion/#to_number)(VARCHAR, 
format)              | DECIMAL     |
-| 
[TO_TIMESTAMP]({{site.baseurl}}/docs/data-type-conversion/#to_timestamp)(VARCHAR,
 format)        | TIMESTAMP   |
-| 
[TO_TIMESTAMP]({{site.baseurl}}/docs/data-type-conversion/#to_timestamp)(DOUBLE)
                 | TIMESTAMP   |
+| Function                                                                     
                  | Return Type |
+| 
----------------------------------------------------------------------------------------------
 | ----------- |
+| [TO_CHAR]({{site.baseurl}}/docs/data-type-conversion/#to_char)(expression, 
format)             | VARCHAR     |
+| [TO_DATE]({{site.baseurl}}/docs/data-type-conversion/#to_date)(expression, 
format)             | DATE        |
+| [TO_NUMBER]({{site.baseurl}}/docs/data-type-conversion/#to_number)(VARCHAR, 
format)            | DECIMAL     |
+| 
[TO_TIMESTAMP]({{site.baseurl}}/docs/data-type-conversion/#to_timestamp)(VARCHAR
 \[, format\]) | TIMESTAMP   |
+| 
[TO_TIMESTAMP]({{site.baseurl}}/docs/data-type-conversion/#to_timestamp)(DOUBLE)
               | TIMESTAMP   |
 
 ### Format Specifiers for Numerical Conversions
 Use the following Java format specifiers for converting numbers:
@@ -859,7 +859,7 @@ Convert 828550000 milliseconds (23 hours 55 seconds) to the 
time.
 
 *expression* is a character string enclosed in single quotation marks or a 
UNIX epoch timestamp, not enclosed in single quotation marks.
 
-*'format'* is a character string that specifies the format of *expression*. 
Only use this option when the *expression* is a character string, not a UNIX 
epoch timestamp.
+*'format'* is an optional character string that specifies the format of 
*expression*. Only use this option when the *expression* is a character string, 
not a UNIX epoch timestamp. If *expression* is a character string and *format* 
is not provided then the function will use a set of heuristics to try to detect 
the date format automatically. If that attempt fails then null is returned.
 
 ### TO_TIMESTAMP Usage Notes
 Specify a format using patterns defined in [Joda DateTimeFormat 
class](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html).
 The TO_TIMESTAMP function takes a Unix epoch timestamp. The TO_DATE function 
takes a UNIX epoch timestamp in milliseconds.
@@ -899,7 +899,7 @@ Convert a UTC date to a timestamp offset from the UTC time 
zone code.
     |------------------------|---------|
     1 row selected (0.148 seconds)
 
-Convert an ISO-8601 timestamp string to a timestamp. The ISO-8601 format 
differs from the ANSI SQL timestamp format and must be explicitly parsed. Note 
the escaped single quotes ('') required to place the separator character 'T' 
into the format string.
+Convert an ISO-8601 timestamp string to a timestamp. The ISO-8601 format 
differs from the ANSI SQL timestamp format and cannot be cast but must be 
explicitly parsed. Note the escaped single quotes ('') required to place the 
separator character 'T' into the format string.
 
 ```sql
 select to_timestamp('2023-02-24T11:21:55', 'YYYY-MM-dd''T''HH:mm:ss');
@@ -910,6 +910,17 @@ EXPR$0  2023-02-24 11:21:55.0
 1 row selected (0.163 seconds)
 ```
 
+Use TO_TIMESTAMP with automatic format detection to parse an IS0-8601 
timestamp.
+
+```sql
+select to_timestamp('2023-02-24T11:21:55');
+```
+```
+EXPR$0  2023-02-24 11:21:55.0
+
+1 row selected (0.151 seconds)
+```
+
 ## Enabling Time Zone Offset
 
 Starting in Drill 1.16, the 
`store.hive.maprdb_json.read_timestamp_with_timezone_offset` option enables 
Drill to read timestamp values with a timezone offset when using the hive 
plugin with the Drill native MaprDB JSON reader enabled through the  
`store.hive.maprdb_json.optimize_scan_with_native_reader option`. The 
`store.hive.maprdb_json.read_timestamp_with_timezone_offset` option is disabled 
(set to 'false') by default. You can enable this option from the Options page 
in the Drill Web  [...]
diff --git 
a/_docs/en/sql-reference/sql-functions/030-date-time-functions-and-arithmetic.md
 
b/_docs/en/sql-reference/sql-functions/030-date-time-functions-and-arithmetic.md
index bab5113ba..b31bf20bb 100644
--- 
a/_docs/en/sql-reference/sql-functions/030-date-time-functions-and-arithmetic.md
+++ 
b/_docs/en/sql-reference/sql-functions/030-date-time-functions-and-arithmetic.md
@@ -671,11 +671,11 @@ Returns a component of a timestamp, time, date, or 
interval.
 
     component FROM (timestamp | time | date | interval)
 
-*component* is one of the following time units: year, month, day, hour, 
minute, second.
+*component* is one of the following time units: year, quarter, month, week, 
day, dayofweek, dayofyear, epoch, hour, minute, second.
 
 ### EXTRACT Usage Notes
 
-The extract function supports the following time units: YEAR, MONTH, DAY, 
HOUR, MINUTE, SECOND.
+The extract function supports the following time units: YEAR, QUARTER, MONTH, 
WEEK, DAY, DAYOFWEEK, DAYOFYEAR, EPOCH, HOUR, MINUTE, SECOND.
 
 ### EXTRACT Examples
 

Reply via email to