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

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_r205932661
 
 

 ##########
 File path: docs/dev/table/sql.md
 ##########
 @@ -1850,6 +1860,17 @@ FROM_BASE64(text string)
       </td>
     </tr>
 
+    <tr>
+      <td>
+        {% highlight text %}
+CHR(ascii integer)
+{% 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>CHR(65)</code> returns <code>A</code>, <code>CHR(97)</code> returns 
<code>a</code>.</p>
 
 Review comment:
   1. Returns string contains a character which converts from a ASCII integer. 
=>  Returns the character corresponding to the input ASCII integer.
   2. If the ASCII => If the ASCII code
   3. return null. => returns null.
   4. 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:
us...@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)

Reply via email to