sadikovi commented on code in PR #42667:
URL: https://github.com/apache/spark/pull/42667#discussion_r1311171288
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala:
##########
@@ -454,11 +454,17 @@ class JacksonParser(
schema.getFieldIndex(parser.getCurrentName) match {
case Some(index) =>
try {
- row.update(index, fieldConverters(index).apply(parser))
+ val value = fieldConverters(index).apply(parser)
+ row.update(index, value)
skipRow = structFilters.skipRow(row, index)
bitmask(index) = false
} catch {
case e: SparkUpgradeException => throw e
+ case err: PartialValueException if enablePartialResults =>
+ badRecordException = badRecordException.orElse(Some(err.cause))
+ row.update(index, err.partialResult)
Review Comment:
Actually, not. When we encounter PartialValueException/`err.partialResult`,
it is already a complex value, e.g. struct/map/array. If there was an error
parsing a primitive value, it would be caught in NonFatal clause and then
rethrown as PartialValueException.
--
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]