Paul Rogers created DRILL-4776:
----------------------------------
Summary: Errata, questions about UDF documentation
Key: DRILL-4776
URL: https://issues.apache.org/jira/browse/DRILL-4776
Project: Apache Drill
Issue Type: Bug
Components: Documentation
Affects Versions: 1.7.0
Reporter: Paul Rogers
Priority: Minor
See the documentation at
https://drill.apache.org/docs/develop-custom-functions-introduction/
"Simple Function: A simple function operates on a single row and produces a
single row as the output."
Some explanation is needed. In SQL, the function accepts a single column and
produces a new column as output: SELECT myFunc( x ) FROM y; The example string
and math functions are, in fact, column (technically "scalar") functions.
Process, item 3: Explain why Drill needs the source files.
On this page: https://drill.apache.org/docs/developing-a-simple-function/
Step 1 has a Maven dependency on version 1.1.0 of Drill. It is probably obvious
to most folks, but the user must replace the 1.1.0 with the version of Drill
that is running on their cluster.
Step 3: it is not clear if the "bit holders" are parameters to a function or
are member variables into which values are injected. Some more background about
the runtime flow would help answer this question. That is, what does Drill do
with the class? When is an instance created? How are values passed in?
Step 4: are setup( ) and eval( ) overrides? If so, add the standard @Override
annotation to help the user understand that these are overrides. Otherwise,
these might be "magic method names" (like "main"), so the user has to know to
use exactly those names (and signatures).
Step 4: explain the purpose of the setup( ) method. When is it called? Once per
Drillbit session? Once per fragment? Once per row? How do we intend it to be
used?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)