You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/10/09 08:57:52 UTC

[GitHub] pnowojski commented on a change in pull request #6445: [FLINK-8302] [table] Add SHIFT_LEFT and SHIFT_RIGHT

pnowojski commented on a change in pull request #6445: [FLINK-8302] [table] Add SHIFT_LEFT and SHIFT_RIGHT
URL: https://github.com/apache/flink/pull/6445#discussion_r223611554
 
 

 ##########
 File path: flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/ScalarOperatorsTest.scala
 ##########
 @@ -74,6 +74,103 @@ class ScalarOperatorsTest extends ScalarOperatorsTestBase {
       "true")
   }
 
+  @Test
+  def testShiftLeft(): Unit = {
+    testAllApis(
+      3.shiftLeft(3),
+      "3.shiftLeft(3)",
+      "shift_left(3,3)",
+      "24"
+    )
+
+    testAllApis(
+      2147483647.shiftLeft(-2147483648),
+      "2147483647.shiftLeft(-2147483648)",
+      "SHIFT_LEFT(2147483647,-2147483648)",
+      "2147483647"
+    )
+
+    testAllApis(
+      -2147483648.shiftLeft(2147483647),
 
 Review comment:
   We need more tests for negative first argument's values

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