[
https://issues.apache.org/jira/browse/CALCITE-2413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vladimir Sitnikov resolved CALCITE-2413.
----------------------------------------
Resolution: Fixed
Fix Version/s: 1.18.0
Fixed in
https://git-wip-us.apache.org/repos/asf?p=calcite.git;a=commit;h=00c36467d0a90290f6085f88debec71b217fe43f
> RexToLixTranslator does not generate correct declaration of Methods with
> generic return types
> ---------------------------------------------------------------------------------------------
>
> Key: CALCITE-2413
> URL: https://issues.apache.org/jira/browse/CALCITE-2413
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.16.0
> Reporter: Arun Mahadevan
> Assignee: Julian Hyde
> Priority: Critical
> Fix For: 1.18.0
>
>
> We have an user defined function like below:
> {code:java}
> public class Identity<I> implements Function<I, I> {
> @Override
> public I apply(I i) {
> return i;
> }
> }
> {code}
> We have a projection that applies the function twice and then the generated
> statement contains the type parameter instead of a valid Java type.
> {code:java}
> final I v = new Identity().apply(current[0] == null ? (String) null :
> current[0].toString());
> {code}
> After tracing through the code for a while it looks like the
> MethodCallExpression uses Method.getGenericReturnType.
> [https://github.com/apache/calcite/blob/master/linq4j/src/main/java/org/apache/calcite/linq4j/tree/MethodCallExpression.java#L53]
> I guess this should be changed to Method.getReturnType instead.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)