[jira] Commented: (PIG-904) Conversion from double to chararray for udf input arguments does not occur
[ https://issues.apache.org/jira/browse/PIG-904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12913227#action_12913227 ] Alan Gates commented on PIG-904: I don't understand what the issue is here. CONCAT does not take doubles. The script above tries to pass it a double, and Pig properly says you can't do that. Is the issue that an implicit cast isn't inserted here? I don't think Pig currently does implicit casts to match possible UDF signatures. Conversion from double to chararray for udf input arguments does not occur -- Key: PIG-904 URL: https://issues.apache.org/jira/browse/PIG-904 Project: Pig Issue Type: Bug Affects Versions: 0.4.0 Reporter: Pradeep Kamath Assignee: Alan Gates Fix For: 0.9.0 Script showing the problem: {noformat} a = load '/user/pig/tests/data/singlefile/studenttab10k' as (name, age, gpa:double); b = foreach a generate CONCAT(gpa, 'dummy'); dump b; Error shown: 2009-08-03 17:04:27,573 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1045: Could not infer the matching function for org.apache.pig.builtin.CONCAT as multiple or none of them fit. Please use an explicit cast. {noformat} The error goes away if gpa is casted to chararray. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (PIG-904) Conversion from double to chararray for udf input arguments does not occur
[ https://issues.apache.org/jira/browse/PIG-904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12788769#action_12788769 ] Jeff Zhang commented on PIG-904: BTW, I noticed that the logic in TypeCheckingVisitor is a bit complex. I think we need a clear documentation about the type checking and some code re-factoring work. Conversion from double to chararray for udf input arguments does not occur -- Key: PIG-904 URL: https://issues.apache.org/jira/browse/PIG-904 Project: Pig Issue Type: Bug Affects Versions: 0.3.1 Reporter: Pradeep Kamath Script showing the problem: {noformat} a = load '/user/pig/tests/data/singlefile/studenttab10k' as (name, age, gpa:double); b = foreach a generate CONCAT(gpa, 'dummy'); dump b; Error shown: 2009-08-03 17:04:27,573 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1045: Could not infer the matching function for org.apache.pig.builtin.CONCAT as multiple or none of them fit. Please use an explicit cast. {noformat} The error goes away if gpa is casted to chararray. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.