[
https://issues.apache.org/jira/browse/DRILL-6272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16444956#comment-16444956
]
ASF GitHub Bot commented on DRILL-6272:
---------------------------------------
Github user vrozov commented on a diff in the pull request:
https://github.com/apache/drill/pull/1225#discussion_r182902723
--- Diff:
exec/java-exec/src/test/resources/udf/dynamic/CustomAbsFunctionTemplate ---
@@ -0,0 +1,45 @@
+package org.apache.drill.udf.dynamic;
+
+import io.netty.buffer.DrillBuf;
+import org.apache.drill.exec.expr.DrillSimpleFunc;
+import org.apache.drill.exec.expr.annotations.FunctionTemplate;
+import org.apache.drill.exec.expr.annotations.Output;
+import org.apache.drill.exec.expr.annotations.Param;
+import org.apache.drill.exec.expr.holders.VarCharHolder;
+
+import javax.inject.Inject;
+
+@FunctionTemplate(
+ name="abs",
+ scope= FunctionTemplate.FunctionScope.SIMPLE,
+ nulls = FunctionTemplate.NullHandling.NULL_IF_NULL
+)
+public class Abs implements DrillSimpleFunc {
+
+ @Param
+ VarCharHolder input1;
+
+ @Param
+ VarCharHolder input2;
+
+ @Output
+ VarCharHolder out;
+
+ @Inject
+ DrillBuf buffer;
+
+ public void setup() {
+
+ }
+
+ public void eval() {
+ String inputString1 =
org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(input1.start,
input1.end, input1.buffer);
+ String inputString2 =
org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(input2.start,
input2.end, input2.buffer);
+ String outputValue = String.format("ABS was overloaded. Input: %s,
%s", inputString1, inputString2);
+
+ out.buffer = buffer;
+ out.start = 0;
+ out.end = outputValue.getBytes().length;
+ buffer.setBytes(0, outputValue.getBytes());
+ }
+}
--- End diff --
LF
> Remove binary jars files from source distribution
> -------------------------------------------------
>
> Key: DRILL-6272
> URL: https://issues.apache.org/jira/browse/DRILL-6272
> Project: Apache Drill
> Issue Type: Task
> Reporter: Vlad Rozov
> Assignee: Arina Ielchiieva
> Priority: Critical
> Fix For: 1.14.0
>
>
> Per [~vrozov] the source distribution contains binary jar files under
> exec/java-exec/src/test/resources/jars
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)