beliefer opened a new pull request #27007: [SPARK-28325][SQL]Support ANSI SQL: 
SIMILAR TO ... ESCAPE syntax
URL: https://github.com/apache/spark/pull/27007
 
 
   ### What changes were proposed in this pull request?
   [ NOT ] SIMILAR TO <similar pattern> [ ESCAPE <escape character> ]
   This is a ANSI SQL.
   For example:
   ```
   SELECT 'abc' SIMILAR TO 'abc' AS `true`;
   SELECT 'abc' SIMILAR TO 'a' AS `false`;
   SELECT 'abc' SIMILAR TO '%(b|d)%' AS `true`;
   SELECT 'abc' SIMILAR TO '(b|c)%' AS `false`;
   ```
   There are some mainstream database 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
   
   ### Why are the changes needed?
   No
   
   
   ### Does this PR introduce any user-facing change?
   No
   
   
   ### How was this patch tested?
   new UT.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to