You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Max Gekk (Jira)" <ji...@apache.org> on 2023/09/21 20:31:00 UTC
[jira] [Created] (SPARK-45262) Improve the description for `LIKE`
Max Gekk created SPARK-45262:
--------------------------------
Summary: Improve the description for `LIKE`
Key: SPARK-45262
URL: https://issues.apache.org/jira/browse/SPARK-45262
Project: Spark
Issue Type: Documentation
Components: SQL
Affects Versions: 4.0.0
Reporter: Max Gekk
Assignee: Max Gekk
The description of `LIKE` says:
{code}
... in order to match "\abc", the pattern should be "\\abc"
{code}
but in Spark SQL shell:
{code:sql}
spark-sql (default)> SELECT c FROM t;
\abc
spark-sql (default)> SELECT c LIKE "\\abc" FROM t;
[INVALID_FORMAT.ESC_IN_THE_MIDDLE] The format is invalid: '\\abc'. The escape character is not allowed to precede 'a'.
spark-sql (default)> SELECT c LIKE "\\\\abc" FROM t;
true
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org