You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "dongjoon-hyun (via GitHub)" <gi...@apache.org> on 2024/06/17 22:15:10 UTC

Re: [PR] [SPARK-48490][CORE] Unescapes any literals for message of MessageWithContext [spark]

dongjoon-hyun commented on code in PR #46824:
URL: https://github.com/apache/spark/pull/46824#discussion_r1643485754


##########
common/utils/src/main/scala/org/apache/spark/internal/Logging.scala:
##########
@@ -99,7 +100,7 @@ case class MessageWithContext(message: String, context: java.util.HashMap[String
  * Companion class for lazy evaluation of the MessageWithContext instance.
  */
 class LogEntry(messageWithContext: => MessageWithContext) {
-  def message: String = messageWithContext.message
+  def message: String = StringEscapeUtils.unescapeJava(messageWithContext.message)

Review Comment:
   Hi, @panbingkun and @gengliangwang .
   
   This seems to break SparkR somehow. Could you take a look at this?
   
   - https://github.com/apache/spark/actions/workflows/build_sparkr_window.yml
   
   ```
   -- Error ('test_basic.R:25:3'): create DataFrame from list or data.frame -------
   Error in `handleErrors(returnStatus, conn)`: java.lang.IllegalArgumentException: Unable to parse unicode value: serF
   	at org.apache.commons.text.translate.UnicodeUnescaper.translate(UnicodeUnescaper.java:55)
   	at org.apache.commons.text.translate.AggregateTranslator.translate(AggregateTranslator.java:58)
   	at org.apache.commons.text.translate.CharSequenceTranslator.translate(CharSequenceTranslator.java:101)
   	at org.apache.commons.text.translate.CharSequenceTranslator.translate(CharSequenceTranslator.java:63)
   	at org.apache.commons.text.StringEscapeUtils.unescapeJava(StringEscapeUtils.java:802)
   	at org.apache.spark.internal.LogEntry.message(Logging.scala:103)
   ```



-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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