spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Takeshi Yamamuro (Jira)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-28037) Add built-in String Functions: quote_literal
Date Sun, 29 Dec 2019 01:02:50 GMT

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

Takeshi Yamamuro updated SPARK-28037:
-------------------------------------
    Parent Issue: SPARK-30375  (was: SPARK-27764)

> Add built-in String Functions: quote_literal
> --------------------------------------------
>
>                 Key: SPARK-28037
>                 URL: https://issues.apache.org/jira/browse/SPARK-28037
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> ||Function||Return Type||Description||Example||Result||
> |{{quote_literal(_{{string}}_ }}{{text}}{{)}}|{{text}}|Return the given string suitably
quoted to be used as a string literal in an SQL statement string. Embedded single-quotes
and backslashes are properly doubled. Note that {{quote_literal}} returns null on null input;
if the argument might be null, {{quote_nullable}} is often more suitable. See also [Example 43.1|https://www.postgresql.org/docs/11/plpgsql-statements.html#PLPGSQL-QUOTE-LITERAL-EXAMPLE].|{{quote_literal(E'O\'Reilly')}}|{{'O''Reilly'}}|
> |{{quote_literal(_{{value}}_ }}{{anyelement}}{{)}}|{{text}}|Coerce the given value to
text and then quote it as a literal. Embedded single-quotes and backslashes are properly doubled.|{{quote_literal(42.5)}}|{{'42.5'}}|
> https://www.postgresql.org/docs/11/functions-string.html
> https://docs.aws.amazon.com/redshift/latest/dg/r_QUOTE_LITERAL.html
> https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/SQLReferenceManual/Functions/String/QUOTE_LITERAL.htm?tocpath=SQL%20Reference%20Manual%7CSQL%20Functions%7CString%20Functions%7C_____38



--
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