You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Rui Wang (JIRA)" <ji...@apache.org> on 2018/11/08 22:18:00 UTC

[jira] [Closed] (BEAM-5945) REVERSE

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

Rui Wang closed BEAM-5945.
--------------------------
       Resolution: Done
    Fix Version/s: Not applicable

> REVERSE
> -------
>
>                 Key: BEAM-5945
>                 URL: https://issues.apache.org/jira/browse/BEAM-5945
>             Project: Beam
>          Issue Type: Sub-task
>          Components: dsl-sql
>            Reporter: Rui Wang
>            Assignee: Rui Wang
>            Priority: Major
>             Fix For: Not applicable
>
>
> REVERSE(value)
> Returns the reverse of the input STRING or BYTES.
> Return type
> STRING or BYTES
> Examples
> WITH example AS (
>   SELECT "foo" AS sample_string, b"bar" AS sample_bytes UNION ALL
>   SELECT "абвгд" AS sample_string, b"123" AS sample_bytes
> )
> SELECT
>   sample_string,
>   REVERSE(sample_string) AS reverse_string,
>   sample_bytes,
>   REVERSE(sample_bytes) AS reverse_bytes
> FROM example;
> +---------------+----------------+--------------+---------------+
> | sample_string | reverse_string | sample_bytes | reverse_bytes |
> +---------------+----------------+--------------+---------------+
> | foo           | oof            | bar          | rab           |
> | абвгд         | дгвба          | 123          | 321           |
> +---------------+----------------+--------------+---------------+



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)