dask-sql
dask-sql copied to clipboard
[DF] Convert explicitly defined ScalarValue functions to Rust macro_rule!
Is your feature request related to a problem? Please describe.
In expression.rs
there is currently a bunch of explicitly defined functions that simply retrieve the Rust value by type. While the individual methods are required due to limitations of PyO3, we could introduce a macro so that each function is not manually defined but rather generated by the Rust macro system.
Describe the solution you'd like
Macro to replace all of the float_32_value
, float_16_value
, float_8_value
, etc functions in expression.rs
Describe alternatives you've considered Using generics instead. PyO3 does not currently support this.
Additional context None