Author: gates Date: Sat Sep 19 00:04:47 2009 New Revision: 816820 URL: http://svn.apache.org/viewvc?rev=816820&view=rev Log: PIG-513: Removed unecessary bounds check in DefaultTuple.
Modified: hadoop/pig/trunk/CHANGES.txt hadoop/pig/trunk/src/org/apache/pig/data/DefaultTuple.java Modified: hadoop/pig/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/CHANGES.txt?rev=816820&r1=816819&r2=816820&view=diff ============================================================================== --- hadoop/pig/trunk/CHANGES.txt (original) +++ hadoop/pig/trunk/CHANGES.txt Sat Sep 19 00:04:47 2009 @@ -30,6 +30,9 @@ BUG FIXES +PIG-513: Removed unecessary bounds check in DefaultTuple (ashutoshc via + gates). + PIG-951: Set parallelism explicitly to 1 for indexing job in merge join (ashutoc via gates). Modified: hadoop/pig/trunk/src/org/apache/pig/data/DefaultTuple.java URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/data/DefaultTuple.java?rev=816820&r1=816819&r2=816820&view=diff ============================================================================== --- hadoop/pig/trunk/src/org/apache/pig/data/DefaultTuple.java (original) +++ hadoop/pig/trunk/src/org/apache/pig/data/DefaultTuple.java Sat Sep 19 00:04:47 2009 @@ -116,7 +116,6 @@ * than or equal to the number of fields in the tuple. */ public boolean isNull(int fieldNum) throws ExecException { - checkBounds(fieldNum); return (mFields.get(fieldNum) == null); } @@ -130,7 +129,6 @@ * the number of fields in the tuple. */ public byte getType(int fieldNum) throws ExecException { - checkBounds(fieldNum); return DataType.findType(mFields.get(fieldNum)); } @@ -142,7 +140,6 @@ * the number of fields in the tuple. */ public Object get(int fieldNum) throws ExecException { - checkBounds(fieldNum); return mFields.get(fieldNum); } @@ -163,7 +160,6 @@ * the number of fields in the tuple. */ public void set(int fieldNum, Object val) throws ExecException { - checkBounds(fieldNum); mFields.set(fieldNum, val); } @@ -352,15 +348,6 @@ } } - private void checkBounds(int fieldNum) throws ExecException { - if (fieldNum >= mFields.size()) { - int errCode = 1072; - String msg = "Out of bounds access: Request for field number " + fieldNum + - " exceeds tuple size of " + mFields.size(); - throw new ExecException(msg, errCode, PigException.INPUT); - } - } - /** * @return true if this Tuple is null */ @@ -376,3 +363,4 @@ } } +