You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ch...@apache.org on 2014/05/30 02:48:09 UTC
svn commit: r1598447 -
/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POUserFunc.java
Author: cheolsoo
Date: Fri May 30 00:48:09 2014
New Revision: 1598447
URL: http://svn.apache.org/r1598447
Log:
PIG-3679: e2e StreamingPythonUDFs_10 fails in trunk (addendum commit for backward compatibility)
Modified:
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POUserFunc.java
Modified: pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POUserFunc.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POUserFunc.java?rev=1598447&r1=1598446&r2=1598447&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POUserFunc.java (original)
+++ pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POUserFunc.java Fri May 30 00:48:09 2014
@@ -279,15 +279,8 @@ public class POUserFunc extends Expressi
Tuple t = (Tuple) result.result;
// For backward compatibility, we short-circuit tuples whose
- // fields are all null. (See PIG-3679)
- boolean allNulls = true;
- for (int i = 0; i < t.size(); i++) {
- if (!t.isNull(i)) {
- allNulls = false;
- break;
- }
- }
- if (allNulls) {
+ // size is 1 and field is null. (See PIG-3679)
+ if (t.size() == 1 && t.isNull(0)) {
pigLogger.warn(this, "All the input values are null, skipping the invocation of UDF",
PigWarning.SKIP_UDF_CALL_FOR_NULL);
Schema outputSchema = func.outputSchema(func.getInputSchema());