Open guilhermeleobas opened 3 years ago
Updated UDTF and query:
// clang-format off
/*
UDTF: foo__cpu_1(Cursor<int32_t>, int32, RowMultiplier) -> Column<int32_t>
UDTF: foo__cpu_2(Cursor<int32_t>, Cursor<int32_t>, RowMultiplier) -> Column<int32_t>
*/
// clang-format on
EXTENSION_NOINLINE int32_t foo__cpu_1(const Column<int32_t>& input1,
const int32_t x,
const int32_t multiplier,
Column<int32_t>& out) {
out[0] = 1;
return 1;
}
EXTENSION_NOINLINE int32_t foo__cpu_2(const Column<int32_t>& input1,
const Column<int32_t>& input2,
const int32_t multiplier,
Column<int32_t>& out) {
out[0] = 2;
return 1;
}
drop table if exists test;
create table test (x INT);
insert into test values (123);
select * from table(foo(
cursor(select x from test),
1,
1
));
select * from table(foo(
cursor(select x from test),
cursor(select x from test)
));
Second query fails with:
2022-12-14 22:26:57 ERROR CalciteServerHandler:process:246 - SQL Error: java.lang.NullPointerException
2022-12-14T22:26:57.607682 E 105371 18 5 DBHandler.cpp:1636 query failed from broken view or other schema related issue
OmniSciDB diff
RBC diff
Steps to reproduce
Apply both diffs and run the following in RBC
Run:
Expected output
Both queries should work