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
.FilterFunc
;
10 import com
.yahoo
.pig
.data
.Tuple
;
12 public class IsEmpty
extends FilterFunc
{
15 public boolean exec(Tuple input
) throws IOException
{
16 return (input
.getBagField(0).cardinality() == 0);