Description
Users now could register a UDF with Instant/LocalDate as return type even with
spark.sql.datetime.java8API.enabled=false. However, the UDF can only be really used with spark.sql.datetime.java8API.enabled=true. This could make users confused.
The problem is we use ExpressionEncoder to ser/deser types when registering the UDF, but use Catalyst converters to ser/deser types, which is under control of spark.sql.datetime.java8API.enabled, when executing UDF.
If we could also use ExpressionEncoder to ser/deser types, similar to what we do for input parameter types, the, UDF could support Instant/LocalDate, event other combined complex types as well.
Attachments
Attachments
Issue Links
- causes
-
SPARK-34002 Broken UDF Encoding
- Resolved
- is related to
-
SPARK-34829 transform_values return identical values when it's used with udf that returns reference type
- Resolved
- links to