This is an automated email from the ASF dual-hosted git repository.
eldenmoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 4c90b459e53 [regression-test](variant) fix variant p2 cases (#28025)
4c90b459e53 is described below
commit 4c90b459e53e1b26972be65664269963ca22279e
Author: lihangyu <[email protected]>
AuthorDate: Wed Dec 6 10:37:18 2023 +0800
[regression-test](variant) fix variant p2 cases (#28025)
---
.../{github_events_advance.groovy => load.groovy} | 24 +++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/regression-test/suites/variant_p2/github_events_advance.groovy
b/regression-test/suites/variant_p2/load.groovy
similarity index 79%
rename from regression-test/suites/variant_p2/github_events_advance.groovy
rename to regression-test/suites/variant_p2/load.groovy
index 48db7a50d0a..9d73d846765 100644
--- a/regression-test/suites/variant_p2/github_events_advance.groovy
+++ b/regression-test/suites/variant_p2/load.groovy
@@ -14,6 +14,8 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
+import java.util.concurrent.Executors
+import java.util.concurrent.TimeUnit
suite("github_event_advance_p2", "variant_type,p2"){
@@ -45,6 +47,12 @@ suite("github_event_advance_p2", "variant_type,p2"){
}
}
+ // Configuration for the number of threads
+ def numberOfThreads = 10 // Set this to your desired number of threads
+
+ // Executor service for managing threads
+ def executorService = Executors.newFixedThreadPool(numberOfThreads)
+
def create_table = {table_name, buckets="auto" ->
sql "DROP TABLE IF EXISTS ${table_name}"
sql """
@@ -79,7 +87,7 @@ suite("github_event_advance_p2", "variant_type,p2"){
}
try {
- set_be_config.call("ratio_of_defaults_as_sparse_column", "1")
+ set_be_config.call("variant_ratio_of_defaults_as_sparse_column", "1")
table_name = "github_events"
create_table.call(table_name, 10)
List<Long> daysEveryMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31,
30, 31]
@@ -99,14 +107,24 @@ suite("github_event_advance_p2", "variant_type,p2"){
log.info("current hour: ${hour}")
def fileName = year + "-" + month + "-" + day + "-" + hour
+ ".json"
log.info("cuurent fileName: ${fileName}")
- load_json_data.call(table_name, """${getS3Url() +
'/regression/github_events_dataset/' + fileName}""")
+ // load_json_data.call(table_name, """${getS3Url() +
'/regression/github_events_dataset/' + fileName}""")
+ def fileUrl = """${getS3Url() +
'/regression/github_events_dataset/' + fileName}"""
+ // Submitting tasks to the executor service
+ executorService.submit({
+ log.info("Loading file: ${fileName}")
+ load_json_data.call(table_name, fileUrl)
+ } as Runnable)
}
}
}
+
+ // Shutdown executor service and wait for all tasks to complete
+ executorService.shutdown()
+ executorService.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS)
qt_sql("select count() from github_events")
} finally {
// reset flags
- set_be_config.call("ratio_of_defaults_as_sparse_column", "0.95")
+ set_be_config.call("variant_ratio_of_defaults_as_sparse_column",
"0.95")
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]