spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (Jira)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-28325) Support ANSI SQL:SIMILAR TO ... ESCAPE syntax
Date Fri, 01 May 2020 16:50:02 GMT

     [ https://issues.apache.org/jira/browse/SPARK-28325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Apache Spark reassigned SPARK-28325:
------------------------------------

    Assignee:     (was: Apache Spark)

> Support ANSI SQL:SIMILAR TO ... ESCAPE syntax
> ---------------------------------------------
>
>                 Key: SPARK-28325
>                 URL: https://issues.apache.org/jira/browse/SPARK-28325
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.1.0
>            Reporter: jiaan.geng
>            Priority: Major
>
> {code:java}
> <similar predicate> ::=
> <row value predicand> <similar predicate part 2>
> <similar predicate part 2> ::=
> [ NOT ] SIMILAR TO <similar pattern> [ ESCAPE <escape character> ]
> <similar pattern> ::=
> <character value expression>
> <regular expression> ::=
> <regular term>
> | <regular expression> <vertical bar> <regular term>
> <regular term> ::=
> <regular factor>
> | <regular term> <regular factor>
> <regular factor> ::=
> <regular primary>
> | <regular primary> <asterisk>
> | <regular primary> <plus sign>
> | <regular primary> <question mark>
> | <regular primary> <repeat factor>
> <repeat factor> ::=
> <left brace> <low value> [ <upper limit> ] <right brace>
> <upper limit> ::=
> <comma> [ <high value> ]
> <low value> ::=
> <unsigned integer>
> <high value> ::=
> <unsigned integer>
> <regular primary> ::=
> <character specifier>
> | <percent>
> | <regular character set>
> | <left paren> <regular expression> <right paren>
> <character specifier> ::=
> <non-escaped character>
> | <escaped character>
> <non-escaped character> ::=
> !! See the Syntax Rules.
> 494 Foundation (SQL/Foundation)
> CD 9075-2:201?(E)
> 8.6 <similar predicate>
> <escaped character> ::=
> !! See the Syntax Rules.
> <regular character set> ::=
> <underscore>
> | <left bracket> <character enumeration>... <right bracket>
> | <left bracket> <circumflex> <character enumeration>... <right
bracket>
> | <left bracket> <character enumeration include>...
> <circumflex> <character enumeration exclude>... <right bracket>
> <character enumeration include> ::=
> <character enumeration>
> <character enumeration exclude> ::=
> <character enumeration>
> <character enumeration> ::=
> <character specifier>
> | <character specifier> <minus sign> <character specifier>
> | <left bracket> <colon> <regular character set identifier> <colon>
<right bracket>
> <regular character set identifier> ::=
> <identifier>{code}
>  
>  Examples:
> {code}
> SELECT 'abc' RLIKE '%(b|d)%';      // false
> SELECT 'abc' SIMILAR TO '%(b|d)%'   // true
> SELECT 'abc' RLIKE '(b|c)%';          // false
> SELECT 'abc' SIMILAR TO '(b|c)%';     // false{code}
>  
> Currently, the following DBMSs support the syntax:
>  * PostgreSQL:[https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP]
>  * Redshift: [https://docs.aws.amazon.com/redshift/latest/dg/pattern-matching-conditions-similar-to.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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


Mime
View raw message