[ https://issues.apache.org/jira/browse/FLINK-6892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16050011#comment-16050011 ]
ASF GitHub Bot commented on FLINK-6892: --------------------------------------- GitHub user sunjincheng121 opened a pull request: https://github.com/apache/flink/pull/4127 [FLINK-6892][table]Add L/RPAD supported in SQL In this PR. have Add L/RPAD supported in SQL,For Example: ``` LPAD('hi',4,'??') -> '??hi' LPAD('hi',1,'??') -> 'h' RPAD('hi',4,'') -> 'hi' RPAD('hi',1,'??') -> 'h' ``` - [x] General - The pull request references the related JIRA issue ("[FLINK-XXX] Jira title text") - The pull request addresses only one issue - Each commit in the PR has a meaningful commit message (including the JIRA id) - [ ] Documentation - Documentation has been added for new functionality - Old documentation affected by the pull request has been updated - JavaDoc for public methods has been added - [x] Tests & Build - Functionality added by the pull request is covered by tests - `mvn clean verify` has been executed successfully locally or a Travis build has passed You can merge this pull request into a Git repository by running: $ git pull https://github.com/sunjincheng121/flink FLINK-6892-PR Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/4127.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #4127 ---- commit ea7006b6ab5cb6ead8d3f2a2b4d5fc2686454a9a Author: sunjincheng121 <sunjincheng...@gmail.com> Date: 2017-06-15T05:23:32Z [FLINK-6892][table]Add L/RPAD supported in SQL ---- > 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)