[
https://issues.apache.org/jira/browse/FLINK-10263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timo Walther resolved FLINK-10263.
----------------------------------
Resolution: Fixed
Fix Version/s: 1.6.2
1.7.0
Fixed in 1.7.0: 116347ea179bdcf0a8eb33581c744143374057a0
Fixed in 1.6.2: 4acb90474d18427e45ee0a274fd88cf963d9220c
> 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 & SQL
> Affects Versions: 1.6.1, 1.7.0
> Reporter: Fabian Hueske
> Assignee: Timo Walther
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.7.0, 1.6.2
>
>
> 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)