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

Method exec

src/org/apache/pig/builtin/COUNT_STAR.java:59–71  ·  view source on GitHub ↗
(Tuple input)

Source from the content-addressed store, hash-verified

57 private static TupleFactory mTupleFactory = TupleFactory.getInstance();
58
59 @Override
60 public Long exec(Tuple input) throws IOException {
61 try {
62 DataBag bag = (DataBag)input.get(0);
63 return bag.size();
64 } catch (ExecException ee) {
65 throw ee;
66 } catch (Exception e) {
67 int errCode = 2106;
68 String msg = "Error while computing count in " + this.getClass().getSimpleName();
69 throw new ExecException(msg, errCode, PigException.BUG, e);
70 }
71 }
72
73 public String getInitial() {
74 return Initial.class.getName();

Callers 1

testCOUNT_STARMethod · 0.95

Calls 3

sizeMethod · 0.95
getClassMethod · 0.80
getMethod · 0.65

Tested by 1

testCOUNT_STARMethod · 0.76