ueshin commented on code in PR #52321: URL: https://github.com/apache/spark/pull/52321#discussion_r2345630820
########## python/pyspark/sql/connect/expressions.py: ########## @@ -436,11 +442,48 @@ def _to_value( assert dataType is None or isinstance(dataType, DayTimeIntervalType) return DayTimeIntervalType().fromInternal(literal.day_time_interval) elif literal.HasField("array"): - elementType = proto_schema_to_pyspark_data_type(literal.array.element_type) + if literal.array.HasField("data_type"): Review Comment: For example of `Array`, `data_type` was added and `element_type` was deprecated. https://github.com/apache/spark/blob/master/sql/connect/common/src/main/protobuf/spark/connect/expressions.proto#L227-L244 but the creator of the message may follow it or may not, so this should be able to handle both cases. Same for `Map` and `Struct`. -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org