Closed Michael-J-Ward closed 1 week ago
Is your feature request related to a problem or challenge? Please describe what you are trying to do. Currently, we de-structure every ScalarValue variant
ScalarValue
https://github.com/apache/datafusion-python/blob/860283a466ddefb47c3fce9299f38cd323bc6933/src/expr.rs#L308-L319
But ScalarValue already implements IntoPy: https://github.com/apache/datafusion/blob/b7d2aea1dd4bb4a3abe3163dae936d7bfa5b32c9/datafusion/common/src/pyarrow.rs#L72-L76
IntoPy
If we want to avoid that unwrap, we could use the ToPyArrow trait: https://github.com/apache/datafusion/blob/b7d2aea1dd4bb4a3abe3163dae936d7bfa5b32c9/datafusion/common/src/pyarrow.rs#L55-L64
unwrap
ToPyArrow
Additional context Are there other constraints the ScalarValue variants that datafusion-python can support other than what datafusion can convert?
datafusion-python
datafusion
Is your feature request related to a problem or challenge? Please describe what you are trying to do. Currently, we de-structure every
ScalarValue
varianthttps://github.com/apache/datafusion-python/blob/860283a466ddefb47c3fce9299f38cd323bc6933/src/expr.rs#L308-L319
But
ScalarValue
already implementsIntoPy
: https://github.com/apache/datafusion/blob/b7d2aea1dd4bb4a3abe3163dae936d7bfa5b32c9/datafusion/common/src/pyarrow.rs#L72-L76If we want to avoid that
unwrap
, we could use theToPyArrow
trait: https://github.com/apache/datafusion/blob/b7d2aea1dd4bb4a3abe3163dae936d7bfa5b32c9/datafusion/common/src/pyarrow.rs#L55-L64Additional context Are there other constraints the
ScalarValue
variants thatdatafusion-python
can support other than whatdatafusion
can convert?