Replies: 2 comments
-
I do not think this is anything to do with you. In general I think DataFusion's support for nested / structured types could be much better -- we have started collecting the ideas here: #2326
I think we should can/should add support for this type in |
Beta Was this translation helpful? Give feedback.
-
I think make_array now returns ListArray which is easier to work with:
|
Beta Was this translation helpful? Give feedback.
-
I admit this might be due to my "noobness", but dealing with
FixedSizeList
in DataFusion has proven to be difficult and I was wondering maybe I could get some insight that would make it more productive.Basically I am having to deal with
FixedSizeList
because I am making use of DataFusion'smake_array
, which returns aFixedSizeList
but there are a couple of issues i have ran into that makes it cumbersome.First, I can't use functions like
array_to_json_array
orrecord_batches_to_json_rows
becauseFixedSizeList
is not supported by arrow_json. I created an issue for this here apache/arrow-rs#4248Second, I cannot use
arrow_cast
to cast it asarrow_cast
also currently does not supportFixedSizeList
Third I am not sure how to define a varadic UDF that takes a
FixedSizeList
.ScalarUDF::new
expectsSignature
and for variadic UDF, I can create a value usingSignature::variadic(vec![DataType::Utf8, DataType::UInt8], Volatility::Immutable)
but if I want to includeFixedSizeList
, I am not sure how to do this.The type definition of
DataType::FixedSizeList
iswhere
FieldRef
ispub type FieldRef = Arc<Field>;
andField
isNow at the point of creating
DataType::FixedSizeList
as needed bySignature::variadic
I am not sure how to set the argument it requires.In general I have been stumped by
FixedSizeList
in so many places where it is either not supported by the greater eco-system or where how to work with it feel cumbersome or not that obvious.Any advice that can help here? Is there a way to wield
FixedSizeList
so it does not feel this difficult to work with?Beta Was this translation helpful? Give feedback.
All reactions