Initial import into git.
[galago.git] / java / pig-galago / src / com / yahoo / pig / impl / logicalLayer / schema / SchemaField.java
blobe81c05facb8f38e27d0670cbd038fcad38b8c5b4
1 /*
2 * Copyright (c) 2007 Yahoo! Inc. All rights reserved.
3 * See accompanying LICENSE file.
4 */
5 package com.yahoo.pig.impl.logicalLayer.schema;
7 import java.util.ArrayList;
8 import java.util.List;
13 /**
14 * A SchemaField encapsulates a column alias
15 * and its numeric column value.
16 * @author dnm
19 public class SchemaField extends SchemaItem {
20 public Type type = Type.string;
22 public SchemaField(String alias) {
23 this.alias = alias;
25 public Type getType() { return type; }
26 public int colFor(String alias) {
27 return -1;
29 public SchemaItem schemaFor(int col) {
30 return null;
33 public SchemaField copy(){
34 return new SchemaField(alias);
37 public List<SchemaItem> flatten(){
38 List<SchemaItem> ret = new ArrayList<SchemaItem>();
39 ret.add(this);
40 return ret;