snuyanzin commented on code in PR #23751:
URL: https://github.com/apache/flink/pull/23751#discussion_r1400588997


##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/utils/UserDefinedTableFunctions.scala:
##########
@@ -429,12 +431,24 @@ abstract class SplittableTableFunction[A, B] extends 
TableFunction[Tuple3[String
 
 @SerialVersionUID(1L)
 class PojoTableFunc extends TableFunction[PojoUser] {
-  def eval(user: String) {
+  def eval(user: String): Unit = {
     if (user.contains("#")) {
       val splits = user.split("#")
       collect(new PojoUser(splits(0), splits(1).toInt))
     }
   }
+
+  override def getTypeInference(typeFactory: DataTypeFactory): TypeInference = 
{
+    TypeInference.newBuilder
+      .typedArguments(DataTypes.STRING())
+      .outputTypeStrategy(
+        TypeStrategies.explicit(
+          DataTypes.STRUCTURED(
+            classOf[PojoUser],
+            DataTypes.FIELD("age", DataTypes.INT()),

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to