File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,13 @@ abstract class StringRegexExpression extends BinaryExpression
8686 escape character, the following character is matched literally. It is invalid to escape
8787 any other character.
8888
89+ Since Spark 2.0, string literals are unescaped in our SQL parser. For example, in order
90+ to match a Tab character "\t", the pattern should be "\\ t".
91+
92+ When SQL config 'spark.sql.parser.escapedStringLiterals' is enabled, it fallbacks
93+ to Spark 1.6 behavior regarding string literal parsing. For example, if the config is
94+ enabled, the pattern to match a Tab character should be "\t".
95+
8996 Examples:
9097 > SELECT '%SystemDrive%\Users\John' _FUNC_ '\%SystemDrive\%\\ Users%'
9198 true
You can’t perform that action at this time.
0 commit comments