|
Hi All,
I am trying to convert a Tuple[Boolean,Row] to Row using map function, I am getting this error asking me for InferedR , what is InferedR in FLink? val mymapFunction: MapFunction[tuple.Tuple2[Boolean, Row],AnyVal] = new MapFunction[tuple.Tuple2[Boolean, Row],AnyVal]() { override def map(t: tuple.Tuple2[Boolean, Row]): Row = { t.f1 } /*override def map(t: tuple.Tuple2[Boolean, Row], collector: Collector[Object]): Unit = { collector.collect(t.f1) } */ } tEnv.toRetractStream(table, classOf[org.apache.flink.types.Row]).map(mymapFunction) .writeAsCsv("/Users/kalit_000/Downloads/FlinkStreamAndSql/src/main/resources/csvOut8", FileSystem.WriteMode.OVERWRITE,"\n","|") and when I try to I get a different type of error.
Error:(143, 74) type mismatch; found : org.apache.flink.api.common.functions.MapFunction[org.apache.flink.api.java.tuple.Tuple2[scala.Boolean,org.apache.flink.types.Row],AnyVal] required: org.apache.flink.api.common.functions.MapFunction[org.apache.flink.api.java.tuple.Tuple2[java.lang.Boolean,org.apache.flink.types.Row],?] tEnv.toRetractStream(table, classOf[org.apache.flink.types.Row]).map(mymapFunction)
-- Thanks & Regards Sri Tummala
|