Aleksey Plekhanov created IGNITE-27412:
------------------------------------------
Summary: 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
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)