Files
scylladb/test/cql/lua_test.cql
Rafael Ávila de Espíndola a4d668e8ed lua: Fix returning list<decimal>
We were accessing the wrong stack location if a decimal was not at top
of the stack.

Fixes: #5711

Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com>
2020-02-03 18:10:04 -08:00

14 lines
473 B
SQL

-- setup
create table my_table (key int primary key);
insert into my_table (key) values (1);
-- test list<varint>
create function my_func(val int) called on null input returns list<varint> language lua as 'return {1,2,3}';
select my_func(key) from my_table;
drop function my_func;
-- test list<decimal>
create function my_func(val int) called on null input returns list<decimal> language lua as 'return {1,2,3}';
select my_func(key) from my_table;
drop function my_func;