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-8302) Support shift_left and shift_right in TableAPI
Date Sun, 07 Jan 2018 12:30:08 GMT

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

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

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

    https://github.com/apache/flink/pull/5202#discussion_r160046929
  
    --- 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
    +    * @param n
    +    * @return input << n
    +    */
    +  def shiftLeft(input: Long, n: Int): Long = {
    +    input << n
    +  }
    +
    +  /**
    +    * Returns the Int number after the input number right shift n bits
    +    * @param input Int type
    +    * @param n
    --- End diff --
    
    number of bits to right shift.


> Support shift_left and shift_right in TableAPI
> ----------------------------------------------
>
>                 Key: FLINK-8302
>                 URL: https://issues.apache.org/jira/browse/FLINK-8302
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>            Reporter: DuBin
>              Labels: features
>             Fix For: 1.5.0
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Add shift_left and shift_right support in TableAPI, shift_left(input, n) act as input
<< n, shift_right(input, n) act as input >> n.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message