flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sunjincheng121 <...@git.apache.org>
Subject [GitHub] flink pull request #5202: [FLINK-8302][table]Add SHIFT_LEFT and SHIFT_RIGHT ...
Date Sun, 07 Jan 2018 12:29:28 GMT
Github user sunjincheng121 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5202#discussion_r160046875
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/functions/ScalarFunctions.scala
---
    @@ -109,4 +110,45 @@ object ScalarFunctions {
           Math.log(x) / Math.log(base)
         }
       }
    +
    +  /**
    +    * Returns the Int number after the input number left shift n bits
    +    * @param input Int type
    +    * @param n
    +    * @return input << n
    +    */
    +  def shiftLeft(input: Int, n: Int): Int = {
    +    input << n
    +  }
    +
    +  /**
    +    * Returns the Long number after the input number left shift n bits
    +    * @param input Long type
    --- End diff --
    
    the base number to shift.


---

Mime
View raw message