sadikovi commented on code in PR #42667:
URL: https://github.com/apache/spark/pull/42667#discussion_r1310855079


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala:
##########
@@ -454,7 +454,20 @@ class JacksonParser(
       schema.getFieldIndex(parser.getCurrentName) match {
         case Some(index) =>
           try {
-            row.update(index, fieldConverters(index).apply(parser))
+            val value = try {
+              fieldConverters(index).apply(parser)
+            } catch {
+              case PartialResultException(partialResult, e) if 
enablePartialResults =>

Review Comment:
   Because it is more convenient to do it this way. Yes, we could leave it in 
the outer catch block but then I would have to copy 
   
   ```scala
   row.update(index, value)
   skipRow = structFilters.skipRow(row, index)
   bitmask(index) = false
   ```
   for each case of PartialResultException.
   
   This is just a convenience thing to not duplicate the code.



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