Github user wuchong commented on a diff in the pull request:
https://github.com/apache/flink/pull/4128#discussion_r127868565
--- Diff:
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/ScalarFunctionsTest.scala
---
@@ -352,6 +352,14 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
"Flink~~~~xx")
}
+ @Test
+ def testBin(): Unit = {
+ testSqlApi("BIN(12)", "1100")
+ testSqlApi("BIN(10)", "1010")
+ testSqlApi("BIN(0)", "0")
+
testSqlApi("BIN(f32)","1111111111111111111111111111111111111111111111111111111111111111")
+ }
+
--- End diff --
Would be better to add validation tests to `ScalarFunctionsValidationTest`
to check the expected exception for unsupported operand types.
---
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.
---