You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Ng Jiunn Jye (JIRA)" <ji...@apache.org> on 2015/04/12 16:58:12 UTC
[jira] [Created] (CALCITE-680) Compilation Error when processing
UDF with binary parameter
Ng Jiunn Jye created CALCITE-680:
------------------------------------
Summary: Compilation Error when processing UDF with binary parameter
Key: CALCITE-680
URL: https://issues.apache.org/jira/browse/CALCITE-680
Project: Calcite
Issue Type: Bug
Reporter: Ng Jiunn Jye
Assignee: Julian Hyde
I am creating Calcite UDF which convert array of byte into string and vice versa.
For BinaryToString udf, the SqlValidator is expecting the function with parameter byte[], but during execution, the EnumerableCalc is expecting the function to take parameter of type ByteString.
Test Sql :
select BinaryToString (x'01020304') from T1
Error Message:
Caused by: org.codehaus.commons.compiler.CompileException: Line 24, Column 84: No applicable constructor/method found for actual parameters "org.apache.calcite.avatica.util.ByteString"; candidates are: "public java.lang.String BinaryToString.eval(byte[])"
Generated Code extract :
public Object current() {
return newBinaryToString().eval(new org.apache.calcite.avatica.util.ByteString(
new byte[] {
(byte)1,
(byte)2,
(byte)3,
(byte)4}));
}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)