Hi,
I have a Java UDF, with input being a record containing an id as well as some
text. The UDF outputs a record of type RelevantTweetType, by setting three
additional fields, with one of them being an array of TermFrequencyType objects
(see type below). Calling result.setField("termFrequencies", x) with the second
parameter x being a JRecord[] results in an error, of course, since it is not
an instance of type IJObject. I was wondering if it is possible to set an array
of a datatype (TermFrequencyType) as a record field in a Java UDF, and if so,
how? Or are the record fields limited to being primitive types when set in a
Java UDF?
CREATE TYPE RelevantTweetType AS CLOSED {
id: int32,
text: string,
threadid: int32,
relevant: boolean,
termsFrequencies: [TermFrequencyType]
};
CREATE TYPE TermFrequencyType AS CLOSED {
term: string,
frequency: int32
};
Thanks in advance,
Sandra