I am new to pig syntax and was wondering if someone can provide a hint for translating this SQL code into pig.
SELECT column1, column2, SUM(column3)
FROM table
WHERE column5 = 100
GROUP BY column2;
So far I have:
data = LOAD....etc.
filterColumn = FILTER data BY column5 = 100;
groupColumn = Group filterColumn By column2;
result = foreach groupColumn Generate group, column1, SUM(column3) as sumCol3;
DUMP result;
This does not work. The error message is "Could not infer the matching function for org.apache.pig.builtin.SUM as multiple or none of them fit. Please use an explicit cast."