2 * Copyright (c) 2007 Yahoo! Inc. All rights reserved.
3 * See accompanying LICENSE file.
5 package com
.yahoo
.pig
.impl
.logicalLayer
;
7 import java
.util
.LinkedList
;
10 import com
.yahoo
.pig
.impl
.PigContext
;
11 import com
.yahoo
.pig
.impl
.logicalLayer
.schema
.SchemaItem
;
12 import com
.yahoo
.pig
.impl
.logicalLayer
.schema
.SchemaItemList
;
14 abstract public class LogicalOperator
{
15 public String alias
= null;
17 public static final int FIXED
= 1;
18 public static final int MONOTONE
= 2;
19 public static final int UPDATABLE
= 3; // Reserved for future use
20 public static final int AMENDABLE
= 4;
22 public LogicalOperator
[] inputs
;
23 public int requestedParallelism
= -1;
24 public SchemaItemList schema
= null;
25 public PigContext pigContext
;
27 protected LogicalOperator(PigContext pigContext
) {
28 this.pigContext
= pigContext
;
31 public abstract SchemaItemList
outputSchema();
33 public String
name() {
37 public LogicalOperator
[] children() {
41 public String
arguments() {
45 public List
<String
> getFuncs() {
46 List
<String
> funcs
= new LinkedList
<String
>();
47 for (int i
= 0; i
< inputs
.length
; i
++) {
48 funcs
.addAll(inputs
[i
].getFuncs());
53 public abstract int getOutputType();