panbingkun commented on code in PR #45975: URL: https://github.com/apache/spark/pull/45975#discussion_r1560455923
########## common/utils/src/test/scala/org/apache/spark/util/MDCSuite.scala: ########## @@ -41,6 +41,21 @@ class MDCSuite assert(log.context === Map("exit_code" -> "CustomObjectValue: spark, 10086").asJava) } + test("null as MDC value") { + val log = log"This is a log, exitcode ${MDC(EXIT_CODE, null)}" + assert(log.message === "This is a log, exitcode null") + assert(log.context === Map("exit_code" -> null).asJava) + } Review Comment: @gengliangwang This is an example, when the value of MDC is `null`. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org