We are developing some user defined functions (aggregates, window aggregates) and table functions in TD 12.0.
We tried to use the example from the "SQL External Routine Programming" book. Unfortunately, the releasea listed on this book is 13.10.
We were able to compile and register the window aggregate without any problem. However, we cannot invoke the function (see below). We wonder whether window aggregates are supported in 12.0. Can someone please clarify?
CREATE FUNCTION syslib.dense_rank(x INTEGER)
EXTERNAL NAME 'SP!//home/mbondre/DBLytix/UDX/BIN/12.00.03.14/ libDenseRank.so'
parameter style SQL;
SELECT v, syslib.dense_rank(v) OVER (PARTITION BY id ORDER BY v
ROWS UNBOUNDED PRECEDING) as dr
FROM t ORDER BY dr;
*** Failure 3706 Syntax error: expected something between ')' and the 'OVER' keyword.
Statement# 2, Info =46
Should have clarified that we are doing this in C++.
User-defined table functions and (non-windowed) aggregate functions are supported in 12.0. Window aggregates require 13.10.