flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-9970) Add ASCII/CHR function for table/sql API
Date Tue, 16 Oct 2018 01:39:00 GMT

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

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

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

 ##########
 File path: flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/ScalarFunctionsTest.scala
 ##########
 @@ -889,6 +916,69 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
       "")
   }
 
+  @Test
+  def testChr(): Unit = {
+    testAllApis(
+      'f14.chr(),
+      "f14.chr()",
+      "CHR(f14)",
+      "null")
+
+    testAllApis(
+      'f34.chr(),
+      "f34.chr()",
+      "CHR(f34)",
+      "null")
+
+    testAllApis(
+      'f34.chr(),
+      "f34.chr()",
+      "CHR(f34)",
+      "null")
+
+    testAllApis(
+      'f36.chr(),
+      "f36.chr()",
+      "CHR(f36)",
+      "A")
+
+    testAllApis(
+      'f37.chr(),
+      "f37.chr()",
+      "CHR(f37)",
+      "a")
+
+    testAllApis(
+      'f38.chr(),
+      "f38.chr()",
+      "CHR(f38)",
+      "ÿ")
+
+    testAllApis(
 
 Review comment:
   There are three test cases that seem to be duplicates, but their SQL functions pass different
input types for verification purposes.

----------------------------------------------------------------
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: Sub-task
>          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)

Mime
View raw message