File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
docs/content/docs/dev/table/functions Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1261,8 +1261,9 @@ env.sqlQuery("SELECT * FROM MyTable, LATERAL TABLE(BackgroundFunction(myField))"
1261
1261
{{< tab "Scala" >}}
1262
1262
``` scala
1263
1263
import org .apache .flink .table .api ._
1264
- import org .apache .flink .table .functions .{AsyncScalarFunction , FunctionContext }
1264
+ import org .apache .flink .table .functions .{AsyncTableFunction , FunctionContext }
1265
1265
1266
+ import java .util
1266
1267
import java .util .Random
1267
1268
import java .util .concurrent .{CompletableFuture , Executor , Executors }
1268
1269
@@ -1274,9 +1275,9 @@ class BackgroundFunc extends AsyncTableFunction[java.lang.Long] {
1274
1275
executor = Executors .newFixedThreadPool(10 )
1275
1276
}
1276
1277
1277
- def eval (future : CompletableFuture [java.util.Collection [java.lang.Long ], waitMax : Integer ): Unit = {
1278
+ def eval (future : CompletableFuture [java.util.Collection [java.lang.Long ]] , waitMax : Integer ): Unit = {
1278
1279
executor.execute(() => {
1279
- ArrayList < Long > result = new ArrayList <> ();
1280
+ val result = new util. ArrayList [java.lang. Long ]()
1280
1281
val sleepTime = new Random ().nextInt(waitMax)
1281
1282
try Thread .sleep(sleepTime)
1282
1283
catch {
You can’t perform that action at this time.
0 commit comments