sadikovi commented on code in PR #42667:
URL: https://github.com/apache/spark/pull/42667#discussion_r1308154891
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala:
##########
@@ -420,17 +420,17 @@ class JacksonParser(
case VALUE_STRING if parser.getTextLength < 1 && allowEmptyString =>
dataType match {
case FloatType | DoubleType | TimestampType | DateType =>
- throw QueryExecutionErrors.emptyJsonFieldValueError(dataType)
+ throw EmptyJsonFieldValueException(dataType)
case _ => null
}
case VALUE_STRING if parser.getTextLength < 1 =>
- throw QueryExecutionErrors.emptyJsonFieldValueError(dataType)
+ throw EmptyJsonFieldValueException(dataType)
Review Comment:
Depending on the JSON object, `EmptyJsonFieldValueException` will be
intercepted at convertObject, convertMap, or convertArray (because every JSON
value will be treated as either of those three although I am not quite sure
about from_json functions)and be wrapped into PartialResultException. This
exception will eventually be converted into BadRecordException in
`JacksonParser.parse` method and processed in `FailureSafeParser` according to
the parsing mode.
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala:
##########
@@ -420,17 +420,17 @@ class JacksonParser(
case VALUE_STRING if parser.getTextLength < 1 && allowEmptyString =>
dataType match {
case FloatType | DoubleType | TimestampType | DateType =>
- throw QueryExecutionErrors.emptyJsonFieldValueError(dataType)
+ throw EmptyJsonFieldValueException(dataType)
case _ => null
}
case VALUE_STRING if parser.getTextLength < 1 =>
- throw QueryExecutionErrors.emptyJsonFieldValueError(dataType)
+ throw EmptyJsonFieldValueException(dataType)
Review Comment:
I hope this answered your question.
--
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]