[ 
https://issues.apache.org/jira/browse/PHOENIX-1142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeffrey Zhong updated PHOENIX-1142:
-----------------------------------
    Attachment: PHOENIX-1142.patch

The attached patch addressed following issues:

1) Make TO_DATE function & internal data time parsing logic same. Both places 
can recognize:

a) Phoenix previous default date format: "yyyy-MM-dd HH:mm:ss"
b) Make "HH:MM:ss" part optional as reported in JIRA PHOENIX-1274
c) All ISO 8601 compliant formats

For example BY DEFAULT following date time strings are able to be recognized:
            "2015-01-27T16:17:57+00:00"
            "2015-01-27T16:17:57Z"
            "2015-01-27T16:17:59"
            "2015-027"
            "2015-W05"
            "2015-W05-2"
            "2015-01-27"
            "2015-01-27 16:17:58"
            "2015-01-27 16:17:58.123"

2)  A user can directly pass date time string into a UPSERT statement without 
using TO_DATE function to cast as following(like other sql)
UPSERT INTO <TABLE> values (..., "2013-01-01",  "2015-01-27 16:17:58",...)

3) Fix the current JIRA issue so that CsvBulkLoad tool can use configuration 
"phoenix.query.dateFormat" or "phoenix.query.dateFormatTimeZone" if CSV file 
date time string isn't ISO8601 complaint.(Check 
CsvBulkLoadToolIT#testBasicImport for example)

> Improve CsvBulkLoadTool to parse different Date formats
> -------------------------------------------------------
>
>                 Key: PHOENIX-1142
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1142
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: David Kjerrumgaard
>            Assignee: Jeffrey Zhong
>         Attachments: PHOENIX-1142.patch
>
>
> Currently, the CsvBulkLoadTool uses a single 'default' format to parse dates 
> from the source CSV file. This can sometimes cause issues when the date 
> fields don't match this default format.
> Would it be possible to add a method for specifying / overriding the 
> 'default' date format?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to