You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I construct the structure through the function struct, my original data type is changed. I don't know if this is a bug or an expected design, but I think a better way is to retain the original type
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+
| plan_type | plan |
+------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+
| initial_logical_plan | Projection: struct(values.c0, values.c1, values.c2) |
| | TableScan: values |
| logical_plan after inline_table_scan | SAME TEXT AS ABOVE |
| logical_plan after type_coercion | Projection: struct(CAST(values.c0 AS Utf8), values.c1, values.c2) |
| | TableScan: values |
| logical_plan after count_wildcard_rule | SAME TEXT AS ABOVE |
| analyzed_logical_plan | SAME TEXT AS ABOVE
I see AnalyzerRule type_coercion cast values.c0 to values.c0 AS Utf8.
I also have some questions, why struct only supports the following types? @Ted-Jiang My idea is that struct can support any type. Is it possible to use TypeSignature::VariadicAny type of function signature?
/// Currently supported types by the struct function.
pub static SUPPORTED_STRUCT_TYPES: &[DataType] = &[
DataType::Boolean,
DataType::UInt8,
DataType::UInt16,
DataType::UInt32,
DataType::UInt64,
DataType::Int8,
DataType::Int16,
DataType::Int32,
DataType::Int64,
DataType::Float32,
DataType::Float64,
DataType::Utf8,
DataType::LargeUtf8,
];
The text was updated successfully, but these errors were encountered:
When I construct the structure through the function
struct
, my original data type is changed. I don't know if this is a bug or an expected design, but I think a better way is to retain the original typeTo Reproduce
I see AnalyzerRule
type_coercion
castvalues.c0
tovalues.c0 AS Utf8
.I also have some questions, why struct only supports the following types? @Ted-Jiang My idea is that struct can support any type. Is it possible to use TypeSignature::VariadicAny type of function signature?
The text was updated successfully, but these errors were encountered: