Github user twalthr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4127#discussion_r127995237
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/functions/ScalarFunctions.scala
 ---
    @@ -82,4 +82,102 @@ object ScalarFunctions {
         }
         sb.toString
       }
    +
    +  /**
    +    * Returns the string str, left-padded with the string pad to a length 
of len characters.
    +    * If str is longer than len, the return value is shortened to len 
characters.
    +    */
    +  def lpad(base: String, len: Integer, pad: String): String = {
    +    if (base == null || len == null || pad == null) {
    +      return null
    +    }
    +    var data = "".getBytes
    +    if (data.length < len) {
    +      data = new Array[Byte](len)
    --- End diff --
    
    Why do we work on bytes here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to