flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Griffith <JGriff...@CampusLabs.com>
Subject Case Class TypeInformation
Date Mon, 16 Oct 2017 21:15:01 GMT
Hello,

I have a case class that wraps a Flink Row and I’d like to use fields from that Row in a
delta iteration join condition. I only have the row’s fields after the job starts. I can
construct RowTypeInfo for the Row but I’m not sure how to add that to Flink’s generated
type information for the case class. Without it, I understandably get the following error
because Flink doesn’t know the Row’s TypeInformation:

org.apache.flink.api.common.InvalidProgramException: This type (GenericType<org.apache.flink.types.Row>)
cannot be used as key.

Is there a way to manually construct or annotate the type information for the case class to
provide the Row’s type information so it can be used in a join? I could alternately replace
the case class with a Tuple and construct a TupleTypeInfo but a tuple is more difficult to
use than a case class.

Thanks,

Joshua
Mime
View raw message