dotnet / dotnet/spark

[FEATURE REQUEST]: Support StructArray as a return type in ArrowFunctions.VectorUdf

Open
#826 3 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
2.1k
Forks
332
Avg merge
1d 20h
Merged PRs (30d)
9

Description

We need to support `StructArray` as a return type in `ArrowFunctions.VectorUdf`.

To repro:
```csharp
Func udf
= ArrowFunctions.VectorUdf((Func) someUDFWrapper);
```
You will get:
```
Unhandled Exception: System.ArgumentException: Apache.Arrow.StructArray is not supported.
at Microsoft.Spark.Utils.UdfUtils.GetReturnType(Type type)
at Microsoft.Spark.Sql.Functions.CreateUdf[TResult](String name, Delegate execute, PythonEvalType evalType)
at Microsoft.Spark.Sql.ArrowFunctions.VectorUdf[T1,T2,TResult](Func`3 udf)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.