sqlignite

Apache Ignite Custom SQL function with Expression as a parameter


I'm looking for a possible way how to create such a function:

SELECT id, MYFUN(value ORDER BY time) FROM People GROUP BY id.

But when I run such a query it returns error that says:

Failed to parse query. ORDER BY unexpected

I've tried different parmeters for my custom function but I can't pass such a expression. If I do pass just column MYFUN(value) or MYFUN(SUM(value)) it works fine. Do we have any way how to accept such an expression? May be there are some predefined parameters, like Row, Contex etc...


Solution

  • It's not currently possible to define a custom aggregate function. You don't say what your function does, but maybe it's possible to rewrite your SQL to use a scalar function. Alternatively, you may have to consider writing your query as a compute task.