pat chan created PIG-3349:
-----------------------------

             Summary: Casting datetime objects support or not?
                 Key: PIG-3349
                 URL: https://issues.apache.org/jira/browse/PIG-3349
             Project: Pig
          Issue Type: Bug
          Components: data
    Affects Versions: 0.11.1
            Reporter: pat chan
            Priority: Minor
             Fix For: 0.11.1


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