[ 
https://issues.apache.org/jira/browse/FLINK-6892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16319979#comment-16319979
 ] 

ASF GitHub Bot commented on FLINK-6892:
---------------------------------------

Github user twalthr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4127#discussion_r160628359
  
    --- Diff: docs/dev/table/sql.md ---
    @@ -1744,6 +1743,29 @@ CONCAT_WS(separator, string1, string2,...)
           </td>
           <td>
             <p>Returns the string that results from concatenating the 
arguments using a separator. The separator is added between the strings to be 
concatenated. Returns NULL If the separator is NULL. CONCAT_WS() does not skip 
empty strings. However, it does skip any NULL argument. E.g. 
<code>CONCAT_WS("~", "AA", "BB", "", "CC")</code> returns 
<code>AA~BB~~CC</code></p>
    +  </td>
    +    </tr>
    +
    +        <tr>
    +      <td>
    +        {% highlight text %}
    +LPAD(text string, len integer, pad string)
    +{% endhighlight %}
    +      </td>
    +      <td>
    +        <p>Returns the string text, left-padded with the string pad to a 
length of len characters. If text is longer than len, the return value is 
shortened to len characters.</p>
    --- End diff --
    
    Can you add two examples where the length is greater/smaller that the 
string.


> Add L/RPAD supported in SQL
> ---------------------------
>
>                 Key: FLINK-6892
>                 URL: https://issues.apache.org/jira/browse/FLINK-6892
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API & SQL
>    Affects Versions: 1.4.0
>            Reporter: sunjincheng
>            Assignee: sunjincheng
>
> L/RPAD(str,len,padstr) Returns the string str, left/right-padded with the 
> string padstr to a length of len characters. If str is longer than len, the 
> return value is shortened to len characters.
> * Syntax:
> LPAD(str,len,padstr) 
> * Arguments
> **str: -
> **len: -
> **padstr: -
> * Return Types
>   String
> * Example:
>   LPAD('hi',4,'??') -> '??hi'
>   LPAD('hi',1,'??') -> 'h'
>   RPAD('hi',4,'??') -> 'hi??'
>   RPAD('hi',1,'??') -> 'h'
> * See more:
> ** [MySQL| 
> https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_lpad]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to