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

    https://github.com/apache/flink/pull/5202#discussion_r160047888
  
    --- Diff: 
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/ScalarFunctionsTest.scala
 ---
    @@ -1216,6 +1216,64 @@ class ScalarFunctionsTest extends 
ScalarTypesTestBase {
         )
       }
     
    +  @Test
    +  def testShiftLeft(): Unit = {
    +    testSqlApi(
    +      "SHIFT_LEFT(1,1)",
    +      "2"
    +    )
    +
    +    testSqlApi(
    +      "SHIFT_LEFT(21,1)",
    +      "42"
    +    )
    +
    +    testSqlApi(
    +      "SHIFT_LEFT(2147483647,-2147483648)",
    +      "2147483647"
    +    )
    +
    +    testSqlApi(
    +      "SHIFT_LEFT(-2147483648,2147483647)",
    +      "0"
    +    )
    +
    +    testSqlApi(
    +      "SHIFT_LEFT(9223372036854775807,-2147483648)",
    +      "9223372036854775807"
    +    )
    +  }
    +
    +  @Test
    +  def testShiftRight(): Unit = {
    --- End diff --
    
    Add a test case using column defined in `ScalarTypesTestBase  `, just like 
as follow:  
    ```
    testSqlApi(
          "SHIFT_RIGHT(f4,1)", // f4 is BIGINT type
          "22"
        )
    ```


---

Reply via email to