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

Method exec

src/org/apache/pig/builtin/COR.java:141–161  ·  view source on GitHub ↗
(Tuple input)

Source from the content-addressed store, hash-verified

139
140 static public class Initial extends EvalFunc<Tuple> {
141 @Override
142 public Tuple exec(Tuple input) throws IOException {
143 if (input == null || input.size() == 0)
144 return null;
145 Tuple output = TupleFactory.getInstance().newTuple(input.size()*(input.size()-1));
146 try {
147 int k = -1;
148 for(int i=0;i<input.size();i++){
149 for(int j=i+1;j<input.size();j++){
150 DataBag first = (DataBag)input.get(i);
151 DataBag second = (DataBag)input.get(j);
152 output.set(++k, computeAll(first, second));
153 output.set(++k, (Long)first.size());
154 }
155 }
156 } catch(Exception t) {
157 System.err.println("Failed to process input record; error - " + t.getMessage());
158 return null;
159 }
160 return output;
161 }
162 }
163
164 static public class Intermed extends EvalFunc<Tuple> {

Callers

nothing calls this directly

Calls 8

getInstanceMethod · 0.95
setMethod · 0.95
sizeMethod · 0.95
sizeMethod · 0.65
newTupleMethod · 0.65
getMethod · 0.65
computeAllMethod · 0.45
getMessageMethod · 0.45

Tested by

no test coverage detected