[
https://issues.apache.org/jira/browse/DRILL-6810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16662586#comment-16662586
]
Paul Rogers commented on DRILL-6810:
------------------------------------
[~KazydubB], thanks for the explanation, makes sense.
Charles and I wrote a chapter in the Drill book about UDFs. While doing that, I
discovered how very hard it is to figure out why Drill does not load a UDF when
I expect it to.
So, in order to improve ease-of-use, maybe add to your disabling mechanism the
following:
* If assertions are on, throw log a message to the log and throw a fatal
exception that clearly explains which function has a problem and what is wrong.
* If assertions are off (this is a production run), just log the message and
ignore the function.
In this way, a person writing a UDF will get a very clear error and can set a
breakpoint on the exception if wanted in order to debug the issue. Functions
that somehow slip through to production don't cause the fatal error.
Will this work?
> Disable NULL_IF_NULL NullHandling for functions with ComplexWriter
> ------------------------------------------------------------------
>
> Key: DRILL-6810
> URL: https://issues.apache.org/jira/browse/DRILL-6810
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 1.14.0
> Reporter: Bohdan Kazydub
> Assignee: Bohdan Kazydub
> Priority: Major
> Fix For: 1.15.0
>
>
> Currently NullHandling.NULL_IF_NULL is allowed for UDFs with @Output of type
> org.apache.drill.exec.vector.complex.writer.BaseWriter.ComplexWriter but no
> null handling is performed for the kind of functions which leads to
> confusion. The problem is ComplexWriter holds list/map values and Drill does
> not yet support NULL values for the types (there is an issue to allow null
> maps/lists in [DRILL-4824|https://issues.apache.org/jira/browse/DRILL-4824]).
> For such functions support for NULL_IF_NULL will be disabled, as it is done
> for aggregate functions, and NullHandling.INTERNAL should be used instead.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)