Initial import into git.
[galago.git] / java / pig-galago / src / com / yahoo / pig / builtin / EFArity.java
blobe81f7029f2f775df950a790de1cfa722f9922325
1 /*
2 * Copyright (c) 2007 Yahoo! Inc. All rights reserved.
3 * See accompanying LICENSE file.
4 */
5 package com.yahoo.pig.builtin;
7 import java.io.IOException;
9 import com.yahoo.pig.AtomEvalFunc;
10 import com.yahoo.pig.data.*;
11 import com.yahoo.pig.impl.logicalLayer.schema.SchemaField;
12 import com.yahoo.pig.impl.logicalLayer.schema.SchemaItem;
13 import com.yahoo.pig.impl.logicalLayer.schema.SchemaItemList;
15 public class EFArity extends AtomEvalFunc {
17 @Override
18 public void exec(Tuple input, DataAtom output) throws IOException {
19 output.setValue(input.arity());
21 @Override
22 public SchemaItem outputSchema() {
23 SchemaItemList schema = new SchemaItemList();
24 schema.add(new SchemaField("arity"));
25 return schema;