2 * Copyright (c) 2007 Yahoo! Inc. All rights reserved.
3 * See accompanying LICENSE file.
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
{
18 public void exec(Tuple input
, DataAtom output
) throws IOException
{
19 output
.setValue(input
.arity());
22 public SchemaItem
outputSchema() {
23 SchemaItemList schema
= new SchemaItemList();
24 schema
.add(new SchemaField("arity"));