[ 
https://issues.apache.org/jira/browse/PHOENIX-1142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14301749#comment-14301749
 ] 

James Taylor commented on PHOENIX-1142:
---------------------------------------

The TO_DATE will be resolved on the server-side if it's in the WHERE clause and 
it cannot be resolved to a constant. My concern is with the second argument for 
TO_DATE. Will the prior date format strings work the same as before? Here's a 
particular case:
{code}
SELECT *  FROM T 
WHERE D > TO_DATE(MIN_D, 'YYYY-MM-DD') AND D < TO_DATE(MAX_D, 'YYYY-MM-DD');
{code}
If the client is 4.2.2, then it'll send this date format string which is 
expected to match what will work for SimpleDateFormat. Will a 4.3 server 
interpret the date format string correctly, as expected?

If yes, great! If not, then one way to deal with this is for 4.3 to send an 
empty string for the second argument (in writeFields) and send the new format 
string in the third argument. Then, in the readFields, if you get a non empty 
second arg, you know that it's from an earlier client and it can be handled as 
it was before.

> 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