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

Daniel Dai commented on PIG-3349:
---------------------------------

+1. We also need to complete type conversion table later.
                
> Document ToString(Datetime, String) UDF
> ---------------------------------------
>
>                 Key: PIG-3349
>                 URL: https://issues.apache.org/jira/browse/PIG-3349
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 0.11.1
>            Reporter: pat chan
>            Assignee: Cheolsoo Park
>            Priority: Minor
>             Fix For: 0.12
>
>         Attachments: PIG-3349.patch
>
>
> Currently you can't cast a datetimeobject into a chararray:
> grunt> B = foreach A generate (chararray)a; dump B;
> 2013-06-05 15:29:01,372 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 
> 1052: 
> <line 8, column 24> Cannot cast datetime to chararray
> Details at logfile: /Users/patc/projects/pig-0.11.1/pig_1370471270879.log
> Was this an oversight? The documented casting matrix does not show the 
> datetime object so I'm not sure if the current behavior is correct or not.
> My recommendation would be to support casting to and from strings. Casting 
> from a string would behave exactly like loading a datetime. Casting to a 
> string would be exactly the format you get when you dump a datetime.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to