Permalink
Browse files

Simplified coalesce a bit

  • Loading branch information...
1 parent 11f1b78 commit ee25f8df2bd51d5a5304d3c7330f5d7fd271d8ba @xstevens xstevens committed Sep 13, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/main/java/com/mozilla/pig/eval/Coalesce.java
@@ -37,16 +37,15 @@ public Object exec(Tuple input) throws IOException {
return null;
}
- Object ret = null;
+ Object o = null;
for (int i=0; i < input.size(); i++) {
- Object o = input.get(i);
+ o = input.get(i);
if (o != null) {
- ret = o;
break;
}
}
- return ret;
+ return o;
}
public Schema outputSchema(Schema input) {

0 comments on commit ee25f8d

Please sign in to comment.