-
Notifications
You must be signed in to change notification settings - Fork 761
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b8ca9bd
commit f26b627
Showing
6 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
tests/suites/0_stateless/20+_others/20_0023_udf_script_parallelism.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
1000000 | ||
2000000 | ||
100000000 |
19 changes: 19 additions & 0 deletions
19
tests/suites/0_stateless/20+_others/20_0023_udf_script_parallelism.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
. "$CURDIR"/../../../shell_env.sh | ||
|
||
$BENDSQL_CLIENT_CONNECT --query=""" | ||
CREATE OR REPLACE FUNCTION js_wait_test ( INT64 ) RETURNS INT64 LANGUAGE javascript HANDLER = 'wait' AS \$\$ | ||
export function wait(n) { | ||
let i = 0; | ||
while (i < n * 1000000) { i++ } | ||
return i; | ||
} | ||
\$\$; | ||
""" | ||
|
||
$BENDSQL_CLIENT_CONNECT --query='select js_wait_test(100)' & | ||
job_pid=$! | ||
$BENDSQL_CLIENT_CONNECT --query='select js_wait_test(1)' | ||
$BENDSQL_CLIENT_CONNECT --query='select js_wait_test(2)' | ||
wait $job_pid |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
1 | ||
2 | ||
100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
. "$CURDIR"/../../../shell_env.sh | ||
|
||
$BENDSQL_CLIENT_CONNECT --query=""" | ||
CREATE OR REPLACE FUNCTION python_sleep ( INT64 ) RETURNS INT64 LANGUAGE python HANDLER = 'sleep' AS \$\$ | ||
import time | ||
def sleep(n): | ||
time.sleep(n/100) | ||
return n | ||
\$\$; | ||
""" | ||
|
||
$BENDSQL_CLIENT_CONNECT --query='select python_sleep(100)' & | ||
job_pid=$! | ||
$BENDSQL_CLIENT_CONNECT --query='select python_sleep(1)' | ||
$BENDSQL_CLIENT_CONNECT --query='select python_sleep(2)' | ||
wait $job_pid |