You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Gengliang Wang (Jira)" <ji...@apache.org> on 2024/04/22 20:54:00 UTC
[jira] [Assigned] (SPARK-47907) Put removal of '!' as a synonym for 'NOT' on a keyword level under a config
[ https://issues.apache.org/jira/browse/SPARK-47907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gengliang Wang reassigned SPARK-47907:
--------------------------------------
Assignee: Serge Rielau
> Put removal of '!' as a synonym for 'NOT' on a keyword level under a config
> ---------------------------------------------------------------------------
>
> Key: SPARK-47907
> URL: https://issues.apache.org/jira/browse/SPARK-47907
> Project: Spark
> Issue Type: Bug
> Components: Spark Core
> Affects Versions: 4.0.0
> Reporter: Serge Rielau
> Assignee: Serge Rielau
> Priority: Major
> Labels: pull-request-available
>
> Recently we dissolved the lexer equivalence between '!' and 'NOT'.
> ! is a prefix operator and a synonym for NOT only in that case.
> But NOT is used in many more cases in the grammar.
> Given that there are a handful of known scenearios where users have exploited the undocumented loophole it's best to add a config.
> Usage found so far is:
> `c1 ! IN(1, 2)`
> `c1 ! BETWEEN 1 AND 2`
> `c1 ! LIKE 'a%'`
> But there are worse cases:
> c1 IS ! NULL
> CREATE TABLE T(c1 INT ! NULL)
> or even
> CREATE TABLE IF ! EXISTS T(c1 INT)
--
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