MaxGekk commented on code in PR #49650:
URL: https://github.com/apache/spark/pull/49650#discussion_r1929510542
##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/util/StringUtils.scala:
##########
@@ -94,7 +95,11 @@ object SparkStringUtils extends Logging {
val restNum = seq.length - numFields
val ending = (if (numFields == 0) "" else sep) +
(if (restNum == 0) "" else s"... $restNum more fields") + end
- seq.take(numFields).mkString(start, sep, ending)
+ if (customToString.isDefined) {
+ seq.take(numFields).map(customToString.get).mkString(start, sep,
ending)
+ } else {
+ seq.take(numFields).mkString(start, sep, ending)
+ }
} else {
seq.mkString(start, sep, end)
Review Comment:
Could you write a test for the case, please. Like top elements are less than
maxFields, but some nested elem has more than maxFields.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]