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

Aleksey Plekhanov updated IGNITE-27412:
---------------------------------------
    Labels: 2.18-review calcite ise  (was: calcite ise)

> Calcite engine. Problem with serialization of plans containing UDF with 
> schema 
> -------------------------------------------------------------------------------
>
>                 Key: IGNITE-27412
>                 URL: https://issues.apache.org/jira/browse/IGNITE-27412
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Aleksey Plekhanov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>              Labels: 2.18-review, calcite, ise
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Reproducer:
> {code:java}
> @Test
> public void testUdf() throws Exception {
>     client.getOrCreateCache(new CacheConfiguration<Integer, Object>("emp")
>         .setSqlSchema("EMP")
>         .setIndexedTypes(Integer.class, Employer.class));
>     client.getOrCreateCache(new CacheConfiguration<Integer, Object>("udf")
>         .setSqlSchema("UDF")
>         .setSqlFunctionClasses(MulFunctionsLibrary.class));
>     for (int i = 0; i < 3; i++)
>         client.cache("emp").put(i, new Employer("emp" + i, (double)i));
>     assertQuery("SELECT udf.mul(_key, _key) FROM emp.Employer")
>         .returns(0).returns(1).returns(4).check();
> } {code}
> Throws:
> {noformat}
> Caused by: java.lang.RuntimeException: Property 
> 'org.apache.calcite.sql.validate.SqlUserDefinedFunction' not valid as the 
> default constructor is necessary, but not found in the class of 
> 'org.apache.calcite.sql.validate.SqlUserDefinedFunction'
>       at 
> org.apache.calcite.avatica.AvaticaUtils.instantiatePlugin(AvaticaUtils.java:274)
>       at 
> org.apache.ignite.internal.processors.query.calcite.externalize.RelJson.toOp(RelJson.java:591)
>       at 
> org.apache.ignite.internal.processors.query.calcite.externalize.RelJson.toRex(RelJson.java:485)
>       at 
> org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader$RelInputImpl.getExpressionList(RelJsonReader.java:258)
>       at 
> org.apache.ignite.internal.processors.query.calcite.trait.TraitUtils$1.getExpressionList(TraitUtils.java:334)
>       at 
> org.apache.ignite.internal.processors.query.calcite.rel.ProjectableFilterableTableScan.<init>(ProjectableFilterableTableScan.java:87)
>       at 
> org.apache.ignite.internal.processors.query.calcite.rel.IgniteTableScan.<init>(IgniteTableScan.java:46){noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to