[
https://issues.apache.org/jira/browse/DRILL-345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yash Sharma updated DRILL-345:
------------------------------
Description:
Add genericUDF/reflectUDF that will allow users to use methods from Java
directly, instead having to write a UDF wrapper on top of existing Java method.
*Usage:*
{code:sql}
SELECT reflect("java.lang.String", "valueOf", 1),
reflect("java.lang.String", "isEmpty"),
reflect("java.lang.Math", "max", 2, 3),
reflect("java.lang.Math", "min", 2, 3),
reflect("java.lang.Math", "round", 2.5),
reflect("java.lang.Math", "exp", 1.0),
reflect("java.lang.Math", "floor", 1.9)
FROM src LIMIT 1;
1 true 3 2 3 2.7182818284590455 1.0
{code}
was:
Add genericUDF/reflectUDF that will allow users to use methods from Java
directly, instead having to write a UDF wrapper on top of existing Java method.
*Usage:*
{code:sql}
SELECT reflect("java.lang.String", "valueOf", 1),
reflect("java.lang.String", "isEmpty"),
reflect("java.lang.Math", "max", 2, 3)
FROM table;
{code}
> Addition of a genericUDF/reflectUDF
> -----------------------------------
>
> Key: DRILL-345
> URL: https://issues.apache.org/jira/browse/DRILL-345
> Project: Apache Drill
> Issue Type: Improvement
> Affects Versions: 1.0.0-milestone-3
> Reporter: Yash Sharma
>
> Add genericUDF/reflectUDF that will allow users to use methods from Java
> directly, instead having to write a UDF wrapper on top of existing Java
> method.
> *Usage:*
> {code:sql}
> SELECT reflect("java.lang.String", "valueOf", 1),
> reflect("java.lang.String", "isEmpty"),
> reflect("java.lang.Math", "max", 2, 3),
> reflect("java.lang.Math", "min", 2, 3),
> reflect("java.lang.Math", "round", 2.5),
> reflect("java.lang.Math", "exp", 1.0),
> reflect("java.lang.Math", "floor", 1.9)
> FROM src LIMIT 1;
> 1 true 3 2 3 2.7182818284590455 1.0
> {code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)