[
https://issues.apache.org/jira/browse/PIG-1429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079455#comment-13079455
]
Zhijie Shen commented on PIG-1429:
----------------------------------
Hi Thejas,
I agree with you on the first two points. For the third one, since conversion
from number to boolean is a surjective function (Z -> {true, false}, R ->
{true, false}), would it be better to construct a surjective function ({all
strings} -> {true, false}) as well to ensure consistency?
Usually, the string that is neither "true" nor "false" is meaningless to be
converted into boolean, but it is not necessarily a error. User applications
should know the context better, thus how about leaving this issue to them? If
they want to use string to represent boolean type, they can only use "true" and
"false" to avoid ambiguity. And Pig just follows the same behavior
Boolean.valueOf().
> Add Boolean Data Type to Pig
> ----------------------------
>
> Key: PIG-1429
> URL: https://issues.apache.org/jira/browse/PIG-1429
> Project: Pig
> Issue Type: New Feature
> Components: data
> Affects Versions: 0.7.0
> Reporter: Russell Jurney
> Assignee: Zhijie Shen
> Labels: boolean, gsoc2011, pig, type
> Attachments: PIG-1429_1.patch, PIG-1429_2.patch, working_boolean.patch
>
> Original Estimate: 8h
> Remaining Estimate: 8h
>
> Pig needs a Boolean data type. Pig-1097 is dependent on doing this.
> I volunteer. Is there anything beyond the work in src/org/apache/pig/data/
> plus unit tests to make this work?
> This is a candidate project for Google summer of code 2011. More information
> about the program can be found at http://wiki.apache.org/pig/GSoc2011
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira