You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2022/09/27 12:08:44 UTC

[incubator-kyuubi] branch master updated: [KYUUBI #3539] [FEATURE][TPCDS] Add white list help run the specified queries

This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 17289b13b [KYUUBI #3539] [FEATURE][TPCDS] Add white list help run the specified queries
17289b13b is described below

commit 17289b13b552586c457ade3b0235748e4bb978b2
Author: zwangsheng <22...@qq.com>
AuthorDate: Tue Sep 27 20:08:31 2022 +0800

    [KYUUBI #3539] [FEATURE][TPCDS] Add white list help run the specified queries
    
    ### _Why are the changes needed?_
    
    Add `white-list` help run the specified queries.
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
    
      `--white-list q4,q15,q19,q25,q42,q49,q60,q66,q68,q72,q76,q78,q79,q89,q97`
    
    ![popo_2022-09-22  15-01-05](https://user-images.githubusercontent.com/52876270/191679906-76639468-a67d-408f-8b83-a18b34ef80e7.jpg)
    
    Closes #3539 from zwangsheng/feature/tpcds_white_list.
    
    Closes #3539
    
    74657957 [zwangsheng] fix
    26ade916 [Binjie Yang] Update dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/benchmark/RunBenchmark.scala
    11a5b5c9 [Binjie Yang] Update dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/benchmark/RunBenchmark.scala
    780410a3 [zwangsheng] fix
    19018932 [zwangsheng] naming
    1a4d1a25 [zwangsheng] naming
    e1bb0069 [zwangsheng] fix
    1be2bcb9 [zwangsheng] white
    
    Lead-authored-by: zwangsheng <22...@qq.com>
    Co-authored-by: Binjie Yang <52...@users.noreply.github.com>
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .../apache/kyuubi/tpcds/benchmark/RunBenchmark.scala  | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/benchmark/RunBenchmark.scala b/dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/benchmark/RunBenchmark.scala
index 71b980165..3e2106cff 100644
--- a/dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/benchmark/RunBenchmark.scala
+++ b/dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/benchmark/RunBenchmark.scala
@@ -29,7 +29,8 @@ case class RunConfig(
     filter: Option[String] = None,
     iterations: Int = 3,
     breakdown: Boolean = false,
-    resultsDir: String = "/spark/sql/performance")
+    resultsDir: String = "/spark/sql/performance",
+    queries: Set[String] = Set.empty)
 
 // scalastyle:off
 /**
@@ -65,6 +66,11 @@ object RunBenchmark {
       opt[String]('r', "results-dir")
         .action((x, c) => c.copy(resultsDir = x))
         .text("dir to store benchmark results, e.g. hdfs://hdfs-nn:9870/pref")
+      opt[String]('q', "queries")
+        .action { case (x, c) =>
+          c.copy(queries = x.split(",").map(_.trim).filter(_.nonEmpty).toSet)
+        }
+        .text("name of the queries to run, use , split multiple name")
       help("help")
         .text("prints this usage text")
     }
@@ -96,11 +102,18 @@ object RunBenchmark {
       benchmark.tpcds2_4Queries
     }
 
+    val runQueries =
+      if (config.queries.nonEmpty) {
+        allQueries.filter(q => config.queries.contains(q.name.split('-')(0)))
+      } else {
+        allQueries
+      }
+
     println("== QUERY LIST ==")
-    allQueries.foreach(q => println(q.name))
+    runQueries.foreach(q => println(q.name))
 
     val experiment = benchmark.runExperiment(
-      executionsToRun = allQueries,
+      executionsToRun = runQueries,
       includeBreakdown = config.breakdown,
       iterations = config.iterations,
       tags = Map("host" -> InetAddress.getLocalHost.getHostName))