Error when using MAX in Apache Pig (Hadoop)
The issue was with column addressing, heres the correct working code:

grpd = GROUP features BY featureid;
temp = FOREACH grpd GENERATE group as featureid, MAX(features.featurevalue) as val;