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 2021/11/30 14:04:00 UTC

[jira] [Updated] (SPARK-37508) Add CONTAINS() function

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

Max Gekk updated SPARK-37508:
-----------------------------
    Description: 
{{contains()}} is a common convenient function supported by a number of database systems:
 # [https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#contains_substr]
 # [https://docs.snowflake.com/en/_static/apple-touch-icon.png!CONTAINS — Snowflake Documentation|https://docs.snowflake.com/en/sql-reference/functions/contains.html]

Proposed syntax:
{code:java}
contains(haystack, needle)
return type: boolean {code}

It is semantically equivalent to {{haystack like '%needle%'}}

  was:
{{contains()}} is a common convenient function supported by a number of database systems:

[!https://www.gstatic.com/devrel-devsite/prod/v7824338a80ec44166704fb131e1860a66ed443b0ce02adfe8171907535d63bde/cloud/images/favicons/onecloud/super_cloud.png!Expressions, functions, and operators  |  BigQuery  |  Google Cloud|https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#contains_substr]

[!https://docs.snowflake.com/en/_static/apple-touch-icon.png!CONTAINS — Snowflake Documentation|https://docs.snowflake.com/en/sql-reference/functions/contains.html]

Proposed syntax:
{{contains(haystack, needle)}}
{{return type: boolean}}
It is semantically equivalent to {{haystack like '%needle%'}}


> Add CONTAINS() function
> -----------------------
>
>                 Key: SPARK-37508
>                 URL: https://issues.apache.org/jira/browse/SPARK-37508
>             Project: Spark
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 3.3.0
>            Reporter: Max Gekk
>            Priority: Major
>
> {{contains()}} is a common convenient function supported by a number of database systems:
>  # [https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#contains_substr]
>  # [https://docs.snowflake.com/en/_static/apple-touch-icon.png!CONTAINS — Snowflake Documentation|https://docs.snowflake.com/en/sql-reference/functions/contains.html]
> Proposed syntax:
> {code:java}
> contains(haystack, needle)
> return type: boolean {code}
> It is semantically equivalent to {{haystack like '%needle%'}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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