[ https://issues.apache.org/jira/browse/FLINK-5795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15869194#comment-15869194 ]
ASF GitHub Bot commented on FLINK-5795: --------------------------------------- Github user wuchong commented on a diff in the pull request: https://github.com/apache/flink/pull/3330#discussion_r101445544 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/utils/UserDefinedFunctionUtils.scala --- @@ -324,4 +325,19 @@ object UserDefinedFunctionUtils { candidate == classOf[Time] && (expected == classOf[Int] || expected == classOf[JInt]) || candidate == classOf[Timestamp] && (expected == classOf[Long] || expected == classOf[JLong]) + @throws[Exception] + def serialize(function: UserDefinedFunction): String = { + val byteArrayOutPut = new ByteArrayOutputStream + val objectOutPut = new ObjectOutputStream(byteArrayOutPut) + objectOutPut.writeObject(function) + objectOutPut.close() + Base64.encodeBase64URLSafeString(byteArrayOutPut.toByteArray) --- End diff -- Dose `Base64.encodeBase64String` sufficient this? > Improve “UDTF" to support constructor with parameter. > ----------------------------------------------------- > > Key: FLINK-5795 > URL: https://issues.apache.org/jira/browse/FLINK-5795 > Project: Flink > Issue Type: Sub-task > Components: Table API & SQL > Reporter: sunjincheng > Assignee: sunjincheng > -- This message was sent by Atlassian JIRA (v6.3.15#6346)