pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Ryaboy <dvrya...@gmail.com>
Subject Slight type mismatch in builtins?
Date Wed, 07 Dec 2011 04:59:29 GMT
I am refactoring the base math functions a bit, and noticed this:

in SUM.java, we have this line:

funcList.add(new FuncSpec(IntSum.class.getName(),
Schema.generateNestedSchema(DataType.BAG, DataType.INTEGER)));


Yet if we look at IntSum, it doesn't return an Integer, it returns a
Long (safe thing to do for overflow):

public class IntSum extends EvalFunc<Long> implements Algebraic,
Accumulator<Long>

Same deal with Floats vs Doubles.

Bug?

D

Mime
View raw message