jiwen624 commented on code in PR #56558:
URL: https://github.com/apache/spark/pull/56558#discussion_r4521882194
##########
sql/core/src/main/scala/org/apache/spark/sql/jdbc/MySQLDialect.scala:
##########
@@ -130,6 +124,15 @@ private case class MySQLDialect() extends JdbcDialect with
SQLConfHelper with No
}
}
+ override def compileValue(value: Any): Any = value match {
+ // '\\' is one backslash in the default sql_mode but two under
NO_BACKSLASH_ESCAPES,
+ // so LEFT('\\', 1) yields exactly one backslash in either mode.
+ case stringValue: String if stringValue.contains('\\') =>
Review Comment:
This is intentionally out of scope, as noted in the description: DDL and
metadata SQL keeps its current escaping. A table comment or index name comes
from someone who can already run DDL over the connection, and COMMENT has no
sql_mode-independent form, so I'd rather not leave a TODO for a change that
isn't planned.
--
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]