You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/07/28 04:46:00 UTC

[jira] [Commented] (FLINK-9970) Add ASCII/CHR function for table/sql API

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

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

hequn8128 commented on a change in pull request #6432: [FLINK-9970] Add ASCII/CHR function for table/sql API
URL: https://github.com/apache/flink/pull/6432#discussion_r205932686
 
 

 ##########
 File path: docs/dev/table/tableApi.md
 ##########
 @@ -2507,6 +2518,17 @@ concat_ws(separator, string1, string2,...)
         <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 %}
+INTEGER.chr()
+{% endhighlight %}
+      </td>
+      <td>
+        <p>Returns string contains a character which converts from a ASCII integer. If the ASCII less then 0 or greater than 255, return null. E.g. <code>97.chr()</code> returns <code>a</code></p>
 
 Review comment:
   1. return null. => returns null.
   2. returns <code>a</code> => returns <code>'a'</code>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Add ASCII/CHR function for table/sql API
> ----------------------------------------
>
>                 Key: FLINK-9970
>                 URL: https://issues.apache.org/jira/browse/FLINK-9970
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API &amp; SQL
>            Reporter: vinoyang
>            Assignee: vinoyang
>            Priority: Minor
>              Labels: pull-request-available
>
> for ASCII function : 
> refer to : [https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_ascii]
> for CHR function : 
> This function convert ASCII code to a character,
> refer to : [https://doc.ispirer.com/sqlways/Output/SQLWays-1-071.html]
> Considering "CHAR" always is a keyword in many database, so we use "CHR" keyword.



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