Github user yhuai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15329#discussion_r82425780
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala
 ---
    @@ -114,6 +120,18 @@ class JacksonParser(
         }
       }
     
    +  private def failedRecord(record: String): Seq[InternalRow] = {
    +    if (options.dropMalformed) {
    +      if (!isWarningPrintedForMalformedRecord) {
    +        logWarning(dropmalformedModeWarningMessage(record))
    +        isWarningPrintedForMalformedRecord = true
    +      }
    +      Nil
    +    } else {
    +      throw new NotAllowedNullException(s"Null not allowed: $record")
    --- End diff --
    
    Please explain why null is not allowed in the error message. Is it possible 
to know which field is not nullable? I am not sure if just printing the record 
is really helpful at here (considering users may often have long JSON records).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to