[ https://issues.apache.org/jira/browse/PIG-2952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471336#comment-13471336 ]
Jonathan Coveney commented on PIG-2952: --------------------------------------- In this case, Pig follows the Java convention. I think in general that's the expectation we create, though sometimes we do try and go with the SQL standard, so I'll leave this open until some other committers weigh in. > Division of an integer by an integer returns an integer > ------------------------------------------------------- > > Key: PIG-2952 > URL: https://issues.apache.org/jira/browse/PIG-2952 > Project: Pig > Issue Type: Bug > Components: impl > Affects Versions: 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.8.1, 0.9.0, > 0.9.1, 0.9.2, 0.10.0 > Reporter: Ashutosh Chauhan > > Currently, > {code} > a = load 'data' as (i:int); > b = foreach a generate i / 23; > {code} > will result in values in b being truncated to nearest int. > SQL standard says correct behavior in such cases is to return double. MySQL > does this correctly as well. -- 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