You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Bohdan Kazydub (JIRA)" <ji...@apache.org> on 2018/10/03 13:07:00 UTC
[jira] [Created] (DRILL-6768) Improve to_date, to_time and
to_timestamp and corresponding cast functions to handle empty string when
`drill.exec.functions.cast_empty_string_to_null` option is enabled
Bohdan Kazydub created DRILL-6768:
-------------------------------------
Summary: Improve to_date, to_time and to_timestamp and corresponding cast functions to handle empty string when `drill.exec.functions.cast_empty_string_to_null` option is enabled
Key: DRILL-6768
URL: https://issues.apache.org/jira/browse/DRILL-6768
Project: Apache Drill
Issue Type: Improvement
Reporter: Bohdan Kazydub
Assignee: Bohdan Kazydub
When `drill.exec.functions.cast_empty_string_to_null` option is enabled
`to_date`, `to_time` and `to_timestamp` functions while converting string to according type in case if null or empty string values are passed will return NULL (to avoid CASE clauses which are littering a query and will work uniformly with numeric types) for both cases.
CASTs will be handled in a similar way:
||Value to cast||Now||Will be||
|NULL|NULL|NULL|
|'' (empty string)|Error in many cases (except numerical types)|NULL|
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)