[
https://issues.apache.org/jira/browse/FLINK-6237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15953531#comment-15953531
]
ASF GitHub Bot commented on FLINK-6237:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3660#discussion_r109424349
--- Diff:
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/SqlExpressionTest.scala
---
@@ -168,6 +168,18 @@ class SqlExpressionTest extends ExpressionTestBase {
testSqlApi("ELEMENT(ARRAY['HELLO WORLD'])", "HELLO WORLD")
}
+ @Test
+ def testRand(): Unit = {
+ val random = new java.util.Random(1)
+ testSqlApi("RAND(1)", random.nextDouble().toString)
+ }
+
+ @Test
+ def testRandInteger(): Unit = {
+ val random = new java.util.Random(1)
+ testSqlApi("RAND_INTEGER(1, 10)", random.nextInt(10).toString)
--- End diff --
Check a second time.
> support RAND and RAND_INTEGER on SQL
> ------------------------------------
>
> Key: FLINK-6237
> URL: https://issues.apache.org/jira/browse/FLINK-6237
> Project: Flink
> Issue Type: New Feature
> Components: Table API & SQL
> Reporter: godfrey he
> Assignee: godfrey he
>
> support RAND and RAND_INTEGER with and without seed on SQL.
> like:
> RAND([seed]),
> RAND_INTEGER([seed, ] bound)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)