flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] TisonKun commented on a change in pull request #6432: [FLINK-9970] Add ASCII function for table/sql API
Date Fri, 27 Jul 2018 01:00:07 GMT
TisonKun commented on a change in pull request #6432: [FLINK-9970] Add ASCII function for table/sql
API
URL: https://github.com/apache/flink/pull/6432#discussion_r205643221
 
 

 ##########
 File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/functions/ScalarFunctions.scala
 ##########
 @@ -196,6 +196,19 @@ object ScalarFunctions {
     new String(data)
   }
 
+  /**
+    * Returns the numeric value of the leftmost character of the string str.
+    * Returns 0 if str is the empty string. Returns NULL if str is NULL.
+    */
+  def ascii(str: String): String = {
+    if (str == null)
 
 Review comment:
   checkstyle would complain about no braces here, i.e. `if (...) { ... }`, also below

----------------------------------------------------------------
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


With regards,
Apache Git Services

Mime
View raw message