[
https://issues.apache.org/jira/browse/BEAM-7787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16892291#comment-16892291
]
Yang Zhang commented on BEAM-7787:
----------------------------------
!Screen Shot 2019-07-24 at 4.58.32 PM.png!
Here is some more information just in case it is useful.
"SELECT getArray(app.appName) FROM app"
In the above SQL, the tableInfo is supposed to be "RecordType(VARCHAR ARRAY
EXPR$0)". In toSqlTypeName function, it first checks the type is an array, and
then decapsulates "ARRAY" and recursively parse "VARCHAR". But now, since there
is nothing before "ARRAY", during the recursion, null pointer exception is
thrown.
> SQL transform crashes when UDF returns a list
> ---------------------------------------------
>
> Key: BEAM-7787
> URL: https://issues.apache.org/jira/browse/BEAM-7787
> Project: Beam
> Issue Type: Bug
> Components: dsl-sql
> Reporter: Yang Zhang
> Priority: Major
> Attachments: Screen Shot 2019-07-24 at 4.58.32 PM.png
>
>
> In Beam UDF, is it feasible to return a list? For example, the UDF function
> is defined as (input) String -> (output) List<String>,
> ```public static class UDF implements SerializableFunction<String,
> List<String>>```
>
> I got a nullpointerexception if a list is returned.
>
> Best,
> Yang
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)