### Is your feature request related to a problem or challenge? ScalarValue does not currently support Maps, see e.g. https://github.com/apache/datafusion/issues/8262#issuecomment-1852700799. https://github.com/apache/datafusion/issues/6485 is probably related as well, though I'm not 100% sure I ran into this when looking to implement Substrait -> DF conversion for MapType ### Describe the solution you'd like Implement ScalarValue::Map and all the related functionality ### Describe alternatives you've considered _No response_ ### Additional context _No response_
Activity
feat: Support Map type in Substrait conversions
goldmedal commentedon Jun 27, 2024
take
goldmedal commentedon Jun 27, 2024
I'm interested in this issue.
As @alamb said in #8262 (comment) :
I think I can used a list of structs with the same type struct to implemented a basic version like:
Then, provide the HashMap (or others) implementation for the physical plan.
Does it make sense?
alamb commentedon Jun 27, 2024
I think ScalarValue::Map should follow the same pattern as
ScalarValue::ListScalarValue::Structdatafusion/datafusion/common/src/scalar/mod.rs
Line 244 in 8216e32
So that would mean a single element
MapArray: https://docs.rs/arrow/latest/arrow/array/struct.MapArray.htmlDoes that make sense?
goldmedal commentedon Jun 27, 2024
Many thanks! It looks good to me. I didn't notice this struct. I will try to follow this pattern to implement this.
feat: Support Map type in Substrait conversions (#11129)
feat: Support Map type in Substrait conversions (apache#11129)