You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Chesnay Schepler (JIRA)" <ji...@apache.org> on 2018/10/17 08:48:00 UTC

[jira] [Closed] (FLINK-10263) User-defined function with LITERAL paramters yields CompileException

     [ https://issues.apache.org/jira/browse/FLINK-10263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chesnay Schepler closed FLINK-10263.
------------------------------------

> User-defined function with LITERAL paramters yields CompileException
> --------------------------------------------------------------------
>
>                 Key: FLINK-10263
>                 URL: https://issues.apache.org/jira/browse/FLINK-10263
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API &amp; SQL
>    Affects Versions: 1.6.1, 1.7.0
>            Reporter: Fabian Hueske
>            Assignee: Timo Walther
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.6.2, 1.7.0
>
>
> When using a user-defined scalar function only with literal parameters, a {{CompileException}} is thrown. For example
> {code}
> SELECT myFunc(CAST(40.750444 AS FLOAT), CAST(-73.993475 AS FLOAT))
> public class MyFunc extends ScalarFunction {
> 	public int eval(float lon, float lat) {
> 		// do something
> 	}
> }
> {code}
> results in 
> {code}
> [ERROR] Could not execute SQL statement. Reason:
> org.codehaus.commons.compiler.CompileException: Line 5, Column 10: Cannot determine simple type name "com"
> {code}
> The problem is probably caused by the expression reducer because it disappears if a regular attribute is added to a parameter expression.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)