Closed thisisnic closed 1 year ago
I get errors and segfaults.
This should not segfault, even if given an invalid plan. Are you possibly calling ValueOrDie in R when running a plan? If not, this bears investigation on its own.
If I specify the output type in the binding, I get a segfault:
It is not obvious, but the only valid kernels for round are:
round(i8, i32)
round(i16, i32)
round(i32, i32)
round(i64, i32)
found(fp32, i32)
round(fp64, i32)
In other words, the s
argument (how many digits) MUST be int32
. It appears that you are passing in float
.
If I remove the line which specifies the output type, I instead get the error:
The output type must always be specified. An error is correct behavior here.
Thanks for that @westonpace - I have now updated my function binding to cast (in R) the s
to an integer, and now it's working as expected. I'm still getting segfaults when using the previous version - will have another look to check what's going on here.
Hmm, looks like these lines from R are responsible:
Will look into how to make this fail more gracefully - thanks for pointing me in the right direction!
Describe the bug, including details regarding any error messages, version, and platform.
I'm writing bindings for the R Substrait producer, and when I try to run a plan which uses the Substrait
round()
function, I get errors and segfaults.If I specify the output type in the binding, I get a segfault:
Here's the GDB output when I run
compiler2 %>% collect()
(i.e. which actually runs the plan)If I remove the line which specifies the output type, I instead get the error:
Component(s)
C++