[ 
https://issues.apache.org/jira/browse/PIG-2679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitriy V. Ryaboy resolved PIG-2679.
------------------------------------

    Resolution: Invalid

You are referencing your fields wrong.

Perhaps reading this will help?

http://squarecog.wordpress.com/2010/05/11/group-operator-in-apache-pig/

There is no "a.server" in the result of grouping b, only the fields "group" and 
"b". "b" containes fields you generated out of a.  So you should be working on 
b.server, etc.
                
>  Could not infer the matching function
> --------------------------------------
>
>                 Key: PIG-2679
>                 URL: https://issues.apache.org/jira/browse/PIG-2679
>             Project: Pig
>          Issue Type: Task
>          Components: grunt
>    Affects Versions: 0.10.0
>         Environment: Redhat LINUX
>            Reporter: Rod Neal
>            Priority: Blocker
>
> a = load '/opt/PIG/data/servers.txt' using PigStorage(':') as (server: 
> chararray, date: chararray, hour: int,minute: int ,io: double, s1: double,s2: 
> double,s3: double);
> b = foreach a generate server, date, hour, io;
> c = group b by server;
> e = foreach c generate a.server, SUM(a.io);
> 2012-04-30 19:25:00,578 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 
> 1045:
> <line 4, column 33> Could not infer the matching function for 
> org.apache.pig.builtin.SUM as multiple or none of them fit. Please use an 
> explicit cast.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to