MCPcopy Create free account
hub / github.com/apache/pig / exec

Method exec

src/org/apache/pig/builtin/SIZE.java:44–56  ·  view source on GitHub ↗
(Tuple input)

Source from the content-addressed store, hash-verified

42public class SIZE extends EvalFunc<Long> {
43
44 @Override
45 public Long exec(Tuple input) throws IOException {
46 try {
47 DataByteArray dba = (DataByteArray)(input.get(0));
48 return dba == null ? null : Long.valueOf(dba.size());
49 } catch (ExecException exp) {
50 throw exp;
51 } catch (Exception e) {
52 int errCode = 2106;
53 String msg = "Error while computing size in " + this.getClass().getSimpleName();
54 throw new ExecException(msg, errCode, PigException.BUG, e);
55 }
56 }
57
58 @Override
59 public Schema outputSchema(Schema input) {

Callers 1

testSIZEMethod · 0.95

Calls 3

sizeMethod · 0.95
getClassMethod · 0.80
getMethod · 0.65

Tested by 1

testSIZEMethod · 0.76