aviyehuda commented on code in PR #56787:
URL: https://github.com/apache/spark/pull/56787#discussion_r3490007477


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/UnivocityParser.scala:
##########
@@ -179,6 +179,12 @@ class UnivocityParser(
 
   private val decimalParser = ExprUtils.getDecimalParser(options.locale)
 
+  private def retryWithTrim[T](f: String => T): String => T = {

Review Comment:
   I replaced retryWithTrim with up-front trim for integral, boolean, and 
decimal converters. Same behavior for valid inputs, but avoids throw/catch on 
the common "1, 1" path and matches how float/double already tolerate whitespace 
natively.



-- 
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]

Reply via email to