Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig, mail # user - a builtin function to return number of fields?


+
Haijun Cao 2008-06-03, 23:49
Copy link to this message
-
RE: a builtin function to return number of fields?
Amir Youssefi 2008-06-03, 23:57
ARITY - computes the number of fields in a tuple (also known as the
"arity" of a tuple)

Amir

-----Original Message-----
From: Haijun Cao [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 03, 2008 4:50 PM
To: [EMAIL PROTECTED]
Subject: a builtin function to return number of fields?

Hi,

I am grouping by $1, but got IndexOutofBoundException because some rows
are mal-formed, they only have 1 field.

Is there a built-in function to return the number of fields for each
row? So I can ignore those rows myself.

Or, even better, automatically ignore the mal-formed rows for me?

Thanks
Haijun
+
Haijun Cao 2008-06-04, 05:47