You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by br...@apache.org on 2018/12/20 23:37:25 UTC

[drill] branch gh-pages updated: edit

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

bridgetb pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/drill.git


The following commit(s) were added to refs/heads/gh-pages by this push:
     new 0e32ed8  edit
0e32ed8 is described below

commit 0e32ed89a2349cf58b1fc376e45e48bd455d3947
Author: Bridget Bevens <bb...@maprtech.com>
AuthorDate: Thu Dec 20 15:36:16 2018 -0800

    edit
---
 .../sql-functions/020-data-type-conversion.md            | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/_docs/sql-reference/sql-functions/020-data-type-conversion.md b/_docs/sql-reference/sql-functions/020-data-type-conversion.md
index 7d68674..9ce1081 100644
--- a/_docs/sql-reference/sql-functions/020-data-type-conversion.md
+++ b/_docs/sql-reference/sql-functions/020-data-type-conversion.md
@@ -10,14 +10,14 @@ Drill supports the following functions for casting and converting data types:
 * [STRING_BINARY]({{ site.baseurl }}/docs/data-type-conversion/#string_binary-function) and [BINARY_STRING]({{ site.baseurl }}/docs/data-type-conversion/#binary_string-function)
 * [Other Data Type Conversions]({{ site.baseurl }}/docs/data-type-conversion/#other-data-type-conversions)  
 
-**Note:** Starting in Drill 1.15, all cast and data type conversion functions return an empty string ('') as null when the `drill.exec.functions.cast_empty_string_to_null` option is enabled, for example:  
-
-	SELECT CAST('' AS DATE) FROM (VALUES(1));
-	+---------+
-	| EXPR$0  |
-	+---------+
-	| null    |
-	+---------+  
+**Note:** Starting in Drill 1.15, all cast and data type conversion functions return null for an empty string ('') when the `drill.exec.functions.cast_empty_string_to_null` option is enabled, for example:    
+
+	SELECT CAST('' AS DATE), TO_TIMESTAMP('', 'yyyy-MM-dd HH:mm:ss') FROM (VALUES(2));
+	+---------+---------+
+	| EXPR$0  | EXPR$1  |
+	+---------+---------+
+	| null    | null    |
+	+---------+---------+
 
 Prior to 1.15, casting an empty string to null only worked for numeric types; in Drill 1.15 and later casting an empty string to null also works for date and time data types, including DATE, TIME, TIMESTAMP, INTERVAL YEAR, INTERVAL MONTH, and INTERVAL DAY.