You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "heyihong (via GitHub)" <gi...@apache.org> on 2025/07/17 13:40:06 UTC
Re: [PR] [SPARK-52449][CONNECT][PYTHON][ML] Make datatypes for Expression.Literal.Map/Array optional [spark]
heyihong commented on code in PR #51473:
URL: https://github.com/apache/spark/pull/51473#discussion_r2213381273
##########
sql/connect/common/src/main/protobuf/spark/connect/expressions.proto:
##########
@@ -215,13 +215,19 @@ message Expression {
}
message Array {
- DataType element_type = 1;
+ // (Optional) The element type of the array. Only need to set this when the elements are
+ // empty, since spark 4.1+ supports inferring the element type from the elements.
+ optional DataType element_type = 1;
repeated Literal elements = 2;
Review Comment:
@zhengruifeng This optimization helps both array and map
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org