Review Board 1.7.22


PIG-3568: Define semantics of STATUS_NULL

Review Request #15524 - Created Nov. 14, 2013 and updated

Mark Wagner
PIG-3568
Reviewers
pig
cheolsoo, daijy, rohini
pig-git
This patch defines STATUS_NULL to mean that no result was produced and changes all conflicts to conform with this interpretation.
'ant test-commit' on this patch, and 'ant test' before merging PIG-3570. There were a couple failures from 'ant test', but they're unrelated

Diff revision 2 (Latest)

1 2
1 2

  1. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/POStatus.java: Loading...
  2. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/PhysicalOperator.java: Loading...
  3. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/EqualToExpr.java: Loading...
  4. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/GTOrEqualToExpr.java: Loading...
  5. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/GreaterThanExpr.java: Loading...
  6. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/LTOrEqualToExpr.java: Loading...
  7. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/LessThanExpr.java: Loading...
  8. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/NotEqualToExpr.java: Loading...
  9. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POAnd.java: Loading...
  10. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POOr.java: Loading...
  11. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POProject.java: Loading...
  12. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/PORelationToExprProject.java: Loading...
  13. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/plans/PhysicalPlan.java: Loading...
  14. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/PODistinct.java: Loading...
  15. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POFilter.java: Loading...
  16. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POLocalRearrange.java: Loading...
  17. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POPartialAgg.java: Loading...
  18. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POPreCombinerLocalRearrange.java: Loading...
  19. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POSort.java: Loading...
  20. test/org/apache/pig/test/TestEqualTo.java: Loading...
  21. test/org/apache/pig/test/TestGTOrEqual.java: Loading...
  22. test/org/apache/pig/test/TestGreaterThan.java: Loading...
  23. test/org/apache/pig/test/TestLTOrEqual.java: Loading...
  24. test/org/apache/pig/test/TestLessThan.java: Loading...
  25. test/org/apache/pig/test/TestNotEqualTo.java: Loading...
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/POStatus.java
Revision 6b7fa97 New Change
[20] 14 lines
[+20]
15
 * See the License for the specific language governing permissions and
15
 * See the License for the specific language governing permissions and
16
 * limitations under the License.
16
 * limitations under the License.
17
 */
17
 */
18
package org.apache.pig.backend.hadoop.executionengine.physicalLayer;
18
package org.apache.pig.backend.hadoop.executionengine.physicalLayer;
19

    
   
19

   

    
   
20
/**

    
   
21
 * POStatus is a set of flags used to communicate the status of Pig's operator

    
   
22
 * pipeline to consumers.

    
   
23
 */
20
public class POStatus {
24
public class POStatus {

    
   
25

   

    
   
26
    /**

    
   
27
     * STATUS_OK indicates that the pull on the operator pipeline resulted in a

    
   
28
     * valid output.

    
   
29
     */
21
    public static final byte STATUS_OK = 0;
30
    public static final byte STATUS_OK = 0;
22

    
   
31

   

    
   
32
    /**

    
   
33
     * STATUS_NULL indicates that no output was produced, but there may be more

    
   
34
     * results. This can happen if a value is filtered out or an empty bag is

    
   
35
     * flattened. A caller will typically ignore the output and try again after

    
   
36
     * seeing STATUS_NULL.

    
   
37
     * 

    
   
38
     * This does NOT indicate that the output is the value 'null' (which is

    
   
39
     * possible in expressions). This is represented as 'null' with STATUS_OK.

    
   
40
     */
23
    public static final byte STATUS_NULL = 1;
41
    public static final byte STATUS_NULL = 1;
24

    
   
42

   

    
   
43
    /**

    
   
44
     * STATUS_ERR indicates that there was a problem while trying to produce a

    
   
45
     * result. This should be remembered and fed back to the user.

    
   
46
     */
25
    public static final byte STATUS_ERR = 2;
47
    public static final byte STATUS_ERR = 2;
26

    
   
48

   
27
    public static final byte STATUS_EOP = 3; // end of processing
49
    /**

    
   
50
     * STATUS_EOP indicates that no output was produced, and no further outputs

    
   
51
     * will be produced (e.g. all attached inputs have been consumed or a limit

    
   
52
     * has reached its threshold). A caller will typically terminate or attach

    
   
53
     * new inputs on seeing this status.

    
   
54
     */

    
   
55
    public static final byte STATUS_EOP = 3;
28

    
   
56

   
29
    // This is currently only used in communications
57
    /**
30
    // between ExecutableManager and POStream
58
     * This is currently only used in communications between ExecutableManager
31
    public static final byte STATUS_EOS = 4; // end of Streaming output (i.e. output from streaming binary)
59
     * and POStream. It indicates the end of Streaming output (i.e. output from

    
   
60
     * streaming binary).

    
   
61
     */

    
   
62
    public static final byte STATUS_EOS = 4;
32

    
   
63

   
33
    // successfully processing of a batch, used by accumulative UDFs
64
    /**
34
    // this is used for accumulative UDFs
65
     * Successful processing of a batch. This is used for accumulative UDFs.

    
   
66
     */
35
    public static final byte STATUS_BATCH_OK = 5;
67
    public static final byte STATUS_BATCH_OK = 5;
36

    
   
68

   
37
    // this signals that an accumulative UDF has already finished
69
    /**

    
   
70
     * This signals that an accumulative UDF has already finished.

    
   
71
     */
38
    public static final byte STATUS_EARLY_TERMINATION = 6;
72
    public static final byte STATUS_EARLY_TERMINATION = 6;
39
}
73
}
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/PhysicalOperator.java
Revision 083702b New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/EqualToExpr.java
Revision dfe43b4 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/GTOrEqualToExpr.java
Revision 64e180a New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/GreaterThanExpr.java
Revision 77c2dfa New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/LTOrEqualToExpr.java
Revision 2d7c888 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/LessThanExpr.java
Revision 15ad635 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/NotEqualToExpr.java
Revision 076bc98 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POAnd.java
Revision b9761c4 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POOr.java
Revision e80a37d New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POProject.java
Revision 9d070de New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/PORelationToExprProject.java
Revision 56a53e8 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/plans/PhysicalPlan.java
Revision c33e3ad New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/PODistinct.java
Revision bb93273 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POFilter.java
Revision d6f4a4f New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POLocalRearrange.java
Revision bbf11c4 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POPartialAgg.java
Revision ffa211f New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POPreCombinerLocalRearrange.java
Revision 49c74bc New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POSort.java
Revision 3f4f914 New Change
 
test/org/apache/pig/test/TestEqualTo.java
Revision d827caa New Change
 
test/org/apache/pig/test/TestGTOrEqual.java
Revision bb23eb4 New Change
 
test/org/apache/pig/test/TestGreaterThan.java
Revision 6422e27 New Change
 
test/org/apache/pig/test/TestLTOrEqual.java
Revision f9310d8 New Change
 
test/org/apache/pig/test/TestLessThan.java
Revision 49b044f New Change
 
test/org/apache/pig/test/TestNotEqualTo.java
Revision cf1ffee New Change
 
  1. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/POStatus.java: Loading...
  2. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/PhysicalOperator.java: Loading...
  3. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/EqualToExpr.java: Loading...
  4. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/GTOrEqualToExpr.java: Loading...
  5. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/GreaterThanExpr.java: Loading...
  6. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/LTOrEqualToExpr.java: Loading...
  7. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/LessThanExpr.java: Loading...
  8. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/NotEqualToExpr.java: Loading...
  9. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POAnd.java: Loading...
  10. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POOr.java: Loading...
  11. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POProject.java: Loading...
  12. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/PORelationToExprProject.java: Loading...
  13. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/plans/PhysicalPlan.java: Loading...
  14. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/PODistinct.java: Loading...
  15. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POFilter.java: Loading...
  16. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POLocalRearrange.java: Loading...
  17. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POPartialAgg.java: Loading...
  18. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POPreCombinerLocalRearrange.java: Loading...
  19. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POSort.java: Loading...
  20. test/org/apache/pig/test/TestEqualTo.java: Loading...
  21. test/org/apache/pig/test/TestGTOrEqual.java: Loading...
  22. test/org/apache/pig/test/TestGreaterThan.java: Loading...
  23. test/org/apache/pig/test/TestLTOrEqual.java: Loading...
  24. test/org/apache/pig/test/TestLessThan.java: Loading...
  25. test/org/apache/pig/test/TestNotEqualTo.java: Loading...