dask-sql icon indicating copy to clipboard operation
dask-sql copied to clipboard

[DF] Convert explicitly defined ScalarValue functions to Rust macro_rule!

Open jdye64 opened this issue 2 years ago • 0 comments

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

jdye64 avatar May 18 '22 13:05 jdye64