[ 
https://issues.apache.org/jira/browse/DRILL-3518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14634262#comment-14634262
 ] 

Ted Dunning commented on DRILL-3518:
------------------------------------

Pitfalls I have fallen into:

1) All data that a UDF uses must be annotated and must be a type that the 
annotation accepts

2) All class references must be fully qualified

3) It is super-easy to make a UDF that doesn't actually load and it is hard to 
see why (at first)

4) UDAF's can't have complex @Workspace variables because there seems to be no 
way to allocate even a Repeated* value, much less to have a ComplexWriter in 
the @Workspace

5) The annotated input, workspace and output variables have life-cycles that 
aren't apparent from the lexical structure of a UDAF. The fact that at add time 
the add() method can't see the output and that at output time both workspace 
and output variables are visible is confusing.

6) figuring out the maven-fu to create acceptable jars takes quite a while



> Do a better job of providing conceptual overview to UDF creation
> ----------------------------------------------------------------
>
>                 Key: DRILL-3518
>                 URL: https://issues.apache.org/jira/browse/DRILL-3518
>             Project: Apache Drill
>          Issue Type: Sub-task
>          Components: Documentation
>            Reporter: Jacques Nadeau
>            Assignee: Bridget Bevens
>
> Since UDFs are effectively written in Java, people find it confusing when 
> some Java features aren't supported.  Let's try to do a better job of 
> outlining the pitfalls.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to