(JoinAccumulator probe, Map<Object, ArrayList<Tuple>> buildInput, JoinInfo joinInfo,
boolean finalJoin)
| 248 | |
| 249 | // inner join - core implementation |
| 250 | protected JoinAccumulator doInnerJoin(JoinAccumulator probe, Map<Object, ArrayList<Tuple>> buildInput, JoinInfo joinInfo, |
| 251 | boolean finalJoin) { |
| 252 | String[] probeKeyName = joinInfo.getOtherField(); |
| 253 | JoinAccumulator result = new JoinAccumulator(); |
| 254 | FieldSelector fieldSelector = new FieldSelector(joinInfo.other.getStreamName(), probeKeyName); |
| 255 | for (ResultRecord rec : probe.getRecords()) { |
| 256 | Object probeKey = rec.getField(fieldSelector); |
| 257 | if (probeKey != null) { |
| 258 | ArrayList<Tuple> matchingBuildRecs = buildInput.get(probeKey); |
| 259 | if (matchingBuildRecs != null) { |
| 260 | for (Tuple matchingRec : matchingBuildRecs) { |
| 261 | ResultRecord mergedRecord = new ResultRecord(rec, matchingRec, finalJoin); |
| 262 | result.insert(mergedRecord); |
| 263 | } |
| 264 | } |
| 265 | } |
| 266 | } |
| 267 | return result; |
| 268 | } |
| 269 | |
| 270 | // left join - core implementation |
| 271 | protected JoinAccumulator doLeftJoin(JoinAccumulator probe, Map<Object, ArrayList<Tuple>> buildInput, JoinInfo joinInfo, |
no test coverage detected