Grokbase Groups Pig user June 2011
UDF I am trying to implement:
- output schema is same as input schema.
- if (input == null)
return tuple matching the schema with NULL for each field.
else return input.

For this, the UDF needs to pass number for fields in input schema to
backend. LoadFunc and StoreFunc handle such a case through setting
properties in UDFContext.getUDFContext().getUDFProperties(class, *
But there does not seem to be any context signature for UDFs.

Is there a way implement such UDF?

Once option is to ask the user to provide number of fields as an argument to
UDF constructor, but that is pretty error prone and practical only in very
simple cases.

UDFContext seems to contain context only for storage.


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriespig, hadoop
postedJun 27, '11 at 9:16p
activeJun 27, '11 at 9:16p

1 user in discussion

Raghu Angadi: 1 post



site design / logo © 2021 Grokbase