Hyukjin Kwon created SPARK-61119:
------------------------------------
Summary: Set the element type of the array literals of the Rust
core, as PySpark does
Key: SPARK-61119
URL: https://issues.apache.org/jira/browse/SPARK-61119
Project: Spark
Issue Type: Bug
Components: Connect
Affects Versions: connect-rust-4.3.0
Reporter: Hyukjin Kwon
The {{spark.connect.Expression.Literal}} of {{LiteralExpression::Array}} of the
Rust core has no element type: {{to_proto}} sets the elements of
{{Literal.Array}}, but neither its {{element_type}} nor the {{data_type}} of
the literal. A Spark 4.3.0 server rejects such a literal, also of elements,
with {{CONNECT_INVALID_PLAN.ARRAY_LITERAL_MISSING_DATA_TYPE}}. So a column of
{{Expression::literal(LiteralExpression::Array { .. })}} fails on the server.
PySpark's {{LiteralExpression.to_plan}} sets the {{element_type}} of an array
literal, also of nested arrays, and the server accepts it, also for an empty
array.
The fix is to set the {{element_type}} of the array literals of the core, as
PySpark does.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]