Hi,
I have been trying to get a case class with a generic parameter working with Filnk 1.0.3 and have been having some trouble. However when I compile I get the following error:
debug-type-bug/src/main/scala/com/example/flink/jobs/CaseClassWithGeneric.scala:40: error: could not find implicit value for evidence parameter of type org.apache.flink.api.common.typeinfo.TypeInformation[com.example.flink.jobs.CaseClassWithGeneric.TestGen[String]]
[ERROR] .apply(new AggregateOrigins)
I am importing org.apache.flink.api.scala._ and the generic type is defined as [T: TypeInformation] as suggested here: https://ci.apache.org/projects/flink/flink-docs-master/internals/types_serialization.html
The full code for the program is as follows:
package com.example.flink.jobs When I dug into the apply() function definition I found the following:
def apply[R: TypeInformation]( |
Hi James, the TypeInformation must be available at the call site, not in the case class definition. In your WindowFunction you are using a TestGen[String] so it should suffice to add this line at some point before the call to apply(): Hope that helps. Best, Aljoscha On Wed, 1 Jun 2016 at 20:11 James Bucher <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |