You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/12/06 03:37:03 UTC

[GitHub] [incubator-kyuubi] ulysses-you opened a new pull request #1496: Support tpcds benchmark

ulysses-you opened a new pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496


   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
     2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
   -->
   
   ### _Why are the changes needed?_
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about the use case of it.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   Support tpcds benchmark in `dev/kyuubi-tpcds` module.
   
   Add a `README.md` in `dev/kyuubi-tpcds` module to show how to use.
   
   ### _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
   
   - [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] codecov-commenter commented on pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#issuecomment-986422247


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1496](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (91e7169) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/b87d206ffb5da16b7d7b7d401be053b0e78c7a99?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b87d206) will **increase** coverage by `0.22%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1496      +/-   ##
   ============================================
   + Coverage     59.11%   59.33%   +0.22%     
     Complexity      172      172              
   ============================================
     Files           235      237       +2     
     Lines         12056    12136      +80     
     Branches       1479     1487       +8     
   ============================================
   + Hits           7127     7201      +74     
   - Misses         4323     4325       +2     
   - Partials        606      610       +4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...kyuubi/engine/spark/session/SparkSessionImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9zZXNzaW9uL1NwYXJrU2Vzc2lvbkltcGwuc2NhbGE=) | `94.73% <0.00%> (-5.27%)` | :arrow_down: |
   | [...ine/spark/operation/SparkSQLOperationManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vU3BhcmtTUUxPcGVyYXRpb25NYW5hZ2VyLnNjYWxh) | `82.50% <0.00%> (-4.17%)` | :arrow_down: |
   | [...ache/kyuubi/operation/KyuubiOperationManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uTWFuYWdlci5zY2FsYQ==) | `81.57% <0.00%> (-2.64%)` | :arrow_down: |
   | [...ubi/engine/spark/operation/PlanOnlyStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vUGxhbk9ubHlTdGF0ZW1lbnQuc2NhbGE=) | `75.86% <0.00%> (-0.81%)` | :arrow_down: |
   | [.../org/apache/kyuubi/session/KyuubiSessionImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXNzaW9uL0t5dXViaVNlc3Npb25JbXBsLnNjYWxh) | `84.21% <0.00%> (-0.52%)` | :arrow_down: |
   | [...e/kyuubi/engine/spark/operation/GetFunctions.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0RnVuY3Rpb25zLnNjYWxh) | `94.59% <0.00%> (-0.15%)` | :arrow_down: |
   | [...uubi/engine/spark/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.50% <0.00%> (-0.13%)` | :arrow_down: |
   | [...ache/kyuubi/engine/spark/operation/GetTables.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0VGFibGVzLnNjYWxh) | `97.36% <0.00%> (-0.07%)` | :arrow_down: |
   | [...che/kyuubi/engine/spark/operation/GetColumns.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0Q29sdW1ucy5zY2FsYQ==) | `98.52% <0.00%> (-0.03%)` | :arrow_down: |
   | [...che/kyuubi/engine/spark/operation/GetSchemas.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0U2NoZW1hcy5zY2FsYQ==) | `90.00% <0.00%> (ø)` | |
   | ... and [9 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [b87d206...91e7169](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#discussion_r762694615



##########
File path: dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/benchmark/Query.scala
##########
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.tpcds.benchmark
+
+import scala.collection.mutable
+import scala.collection.mutable.ArrayBuffer
+import scala.language.implicitConversions
+
+import org.apache.spark.sql.DataFrame
+import org.apache.spark.sql.catalyst.analysis.UnresolvedRelation
+import org.apache.spark.sql.execution.SparkPlan
+
+/** Holds one benchmark query and its metadata. */
+class Query(
+    override val name: String,
+    buildDataFrame: => DataFrame,
+    val description: String = "",
+    val sqlText: Option[String] = None,
+    override val executionMode: ExecutionMode = ExecutionMode.ForeachResults)
+  extends Benchmarkable with Serializable {
+
+  implicit private def toOption[A](a: A): Option[A] = Option(a)
+
+  override def toString: String = {
+    try {
+      s"""
+         |== Query: $name ==
+         |${buildDataFrame.queryExecution.analyzed}
+     """.stripMargin
+    } catch {
+      case e: Exception =>
+        s"""
+           |== Query: $name ==
+           | Can't be analyzed: $e
+           |
+           | $description
+         """.stripMargin
+    }
+  }
+
+  lazy val tablesInvolved = buildDataFrame.queryExecution.logical collect {
+    case r: UnresolvedRelation => r.tableName
+  }
+
+  def newDataFrame(): DataFrame = buildDataFrame
+
+  override protected def doBenchmark(
+      includeBreakdown: Boolean,
+      description: String = "",
+      messages: ArrayBuffer[String]): BenchmarkResult = {
+    try {
+      val dataFrame = buildDataFrame
+      val queryExecution = dataFrame.queryExecution
+      // We are not counting the time of ScalaReflection.convertRowToScala.
+      val parsingTime = measureTimeMs {
+        queryExecution.logical
+      }
+      val analysisTime = measureTimeMs {
+        queryExecution.analyzed
+      }
+      val optimizationTime = measureTimeMs {
+        queryExecution.optimizedPlan
+      }
+      val planningTime = measureTimeMs {
+        queryExecution.executedPlan
+      }
+
+      val breakdownResults =
+        if (includeBreakdown) {
+          val depth = queryExecution.executedPlan.collect { case p: SparkPlan => p }.size
+          val physicalOperators = (0 until depth).map(i => (i, queryExecution.executedPlan.p(i)))
+          val indexMap = physicalOperators.map { case (index, op) => (op, index) }.toMap
+          val timeMap = new mutable.HashMap[Int, Double]
+          val maxFields = 999 // Maximum number of fields that will be converted to strings
+
+          physicalOperators.reverse.map {
+            case (index, node) =>
+              messages += s"Breakdown: ${node.simpleString(maxFields)}"
+              val newNode = buildDataFrame.queryExecution.executedPlan.p(index)
+              val executionTime = measureTimeMs {
+                newNode.execute().foreach((row: Any) => Unit)
+              }
+              timeMap += ((index, executionTime))
+
+              val childIndexes = node.children.map(indexMap)
+              val childTime = childIndexes.map(timeMap).sum
+              messages += s"Breakdown time: $executionTime (+${executionTime - childTime})"
+
+              BreakdownResult(
+                node.nodeName,
+                node.simpleString(1000).replaceAll("#\\d+", ""),
+                index,
+                childIndexes,
+                executionTime,
+                executionTime - childTime)
+          }
+        } else {
+          Seq.empty[BreakdownResult]
+        }
+
+      // The executionTime for the entire query includes the time of type conversion from catalyst
+      // to scala.
+      // Note: queryExecution.{logical, analyzed, optimizedPlan, executedPlan} has been already
+      // lazily evaluated above, so below we will count only execution time.
+      var result: Option[Long] = None
+      val executionTime = measureTimeMs {
+        executionMode match {
+          case ExecutionMode.CollectResults => dataFrame.collect()
+          case ExecutionMode.ForeachResults => dataFrame.foreach { _ => (): Unit }
+          case ExecutionMode.WriteParquet(location) =>
+            dataFrame.write.parquet(s"$location/$name.parquet")

Review comment:
       `mode.(Overwrite)`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#discussion_r762695246



##########
File path: dev/kyuubi-tpcds/pom.xml
##########
@@ -43,6 +43,22 @@
             <artifactId>spark-sql_${scala.binary.version}</artifactId>
             <scope>provided</scope>
         </dependency>
+
+        <dependency>
+            <groupId>com.github.scopt</groupId>
+            <artifactId>scopt_2.12</artifactId>

Review comment:
       `${scala_binary_version}`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#discussion_r762694364



##########
File path: dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/benchmark/Query.scala
##########
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.tpcds.benchmark
+
+import scala.collection.mutable
+import scala.collection.mutable.ArrayBuffer
+import scala.language.implicitConversions
+
+import org.apache.spark.sql.DataFrame
+import org.apache.spark.sql.catalyst.analysis.UnresolvedRelation
+import org.apache.spark.sql.execution.SparkPlan
+
+/** Holds one benchmark query and its metadata. */
+class Query(
+    override val name: String,
+    buildDataFrame: => DataFrame,
+    val description: String = "",
+    val sqlText: Option[String] = None,
+    override val executionMode: ExecutionMode = ExecutionMode.ForeachResults)
+  extends Benchmarkable with Serializable {
+
+  implicit private def toOption[A](a: A): Option[A] = Option(a)
+
+  override def toString: String = {
+    try {
+      s"""
+         |== Query: $name ==
+         |${buildDataFrame.queryExecution.analyzed}
+     """.stripMargin
+    } catch {
+      case e: Exception =>
+        s"""
+           |== Query: $name ==
+           | Can't be analyzed: $e
+           |
+           | $description
+         """.stripMargin
+    }
+  }
+
+  lazy val tablesInvolved = buildDataFrame.queryExecution.logical collect {
+    case r: UnresolvedRelation => r.tableName
+  }
+
+  def newDataFrame(): DataFrame = buildDataFrame
+
+  override protected def doBenchmark(
+      includeBreakdown: Boolean,
+      description: String = "",
+      messages: ArrayBuffer[String]): BenchmarkResult = {
+    try {
+      val dataFrame = buildDataFrame
+      val queryExecution = dataFrame.queryExecution
+      // We are not counting the time of ScalaReflection.convertRowToScala.
+      val parsingTime = measureTimeMs {
+        queryExecution.logical
+      }
+      val analysisTime = measureTimeMs {
+        queryExecution.analyzed
+      }
+      val optimizationTime = measureTimeMs {
+        queryExecution.optimizedPlan
+      }
+      val planningTime = measureTimeMs {
+        queryExecution.executedPlan
+      }
+
+      val breakdownResults =
+        if (includeBreakdown) {
+          val depth = queryExecution.executedPlan.collect { case p: SparkPlan => p }.size
+          val physicalOperators = (0 until depth).map(i => (i, queryExecution.executedPlan.p(i)))
+          val indexMap = physicalOperators.map { case (index, op) => (op, index) }.toMap
+          val timeMap = new mutable.HashMap[Int, Double]
+          val maxFields = 999 // Maximum number of fields that will be converted to strings
+
+          physicalOperators.reverse.map {
+            case (index, node) =>
+              messages += s"Breakdown: ${node.simpleString(maxFields)}"
+              val newNode = buildDataFrame.queryExecution.executedPlan.p(index)
+              val executionTime = measureTimeMs {
+                newNode.execute().foreach((row: Any) => Unit)
+              }
+              timeMap += ((index, executionTime))
+
+              val childIndexes = node.children.map(indexMap)
+              val childTime = childIndexes.map(timeMap).sum
+              messages += s"Breakdown time: $executionTime (+${executionTime - childTime})"
+
+              BreakdownResult(
+                node.nodeName,
+                node.simpleString(1000).replaceAll("#\\d+", ""),
+                index,
+                childIndexes,
+                executionTime,
+                executionTime - childTime)
+          }
+        } else {
+          Seq.empty[BreakdownResult]
+        }
+
+      // The executionTime for the entire query includes the time of type conversion from catalyst
+      // to scala.
+      // Note: queryExecution.{logical, analyzed, optimizedPlan, executedPlan} has been already
+      // lazily evaluated above, so below we will count only execution time.
+      var result: Option[Long] = None
+      val executionTime = measureTimeMs {
+        executionMode match {
+          case ExecutionMode.CollectResults => dataFrame.collect()
+          case ExecutionMode.ForeachResults => dataFrame.foreach { _ => (): Unit }
+          case ExecutionMode.WriteParquet(location) =>
+            dataFrame.write.parquet(s"$location/$name.parquet")
+          case ExecutionMode.HashResults =>
+            // SELECT SUM(CRC32(CONCAT_WS(", ", *))) FROM (benchmark query)

Review comment:
       How about `CRC32(CONCAT_WS(", ", *))` => `hash(*)`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#discussion_r762693471



##########
File path: dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/benchmark/TPCDS_2_4_Queries.scala
##########
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.tpcds.benchmark
+
+import org.apache.commons.io.IOUtils
+
+/**
+ * This implements the official TPCDS v2.4 queries with only cosmetic modifications.
+ */
+trait Tpcds_2_4_Queries extends Benchmark {
+
+  import ExecutionMode._
+
+  val queryNames = Seq(
+    "q1",
+    "q2",
+    "q3",
+    "q4",
+    "q5",
+    "q6",
+    "q7",
+    "q8",
+    "q9",
+    "q10",
+    "q11",
+    "q12",
+    "q13",
+    "q14a",
+    "q14b",
+    "q15",
+    "q16",
+    "q17",
+    "q18",
+    "q19",
+    "q20",
+    "q21",
+    "q22",
+    "q23a",
+    "q23b",
+    "q24a",
+    "q24b",
+    "q25",
+    "q26",
+    "q27",
+    "q28",
+    "q29",
+    "q30",
+    "q31",
+    "q32",
+    "q33",
+    "q34",
+    "q35",
+    "q36",
+    "q37",
+    "q38",
+    "q39a",
+    "q39b",
+    "q40",
+    "q41",
+    "q42",
+    "q43",
+    "q44",
+    "q45",
+    "q46",
+    "q47",
+    "q48",
+    "q49",
+    "q50",
+    "q51",
+    "q52",
+    "q53",
+    "q54",
+    "q55",
+    "q56",
+    "q57",
+    "q58",
+    "q59",
+    "q60",
+    "q61",
+    "q62",
+    "q63",
+    "q64",
+    "q65",
+    "q66",
+    "q67",
+    "q68",
+    "q69",
+    "q70",
+    "q71",
+    "q72",
+    "q73",
+    "q74",
+    "q75",
+    "q76",
+    "q77",
+    "q78",
+    "q79",
+    "q80",
+    "q81",
+    "q82",
+    "q83",
+    "q84",
+    "q85",
+    "q86",
+    "q87",
+    "q88",
+    "q89",
+    "q90",
+    "q91",
+    "q92",
+    "q93",
+    "q94",
+    "q95",
+    "q96",
+    "q97",
+    "q98",
+    "q99",
+    "ss_max")
+
+  val tpcds2_4Queries = queryNames.map { queryName =>
+    val queryContent: String = IOUtils.toString(
+      getClass().getClassLoader().getResourceAsStream(s"tpcds_2_4/$queryName.sql"))
+    Query(
+      queryName + "-v2.4",
+      queryContent,
+      description = "TPCDS 2.4 Query",
+      executionMode = CollectResults)

Review comment:
       expose `executionMode` to args?

##########
File path: dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/benchmark/TPCDS_2_4_Queries.scala
##########
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.tpcds.benchmark
+
+import org.apache.commons.io.IOUtils
+
+/**
+ * This implements the official TPCDS v2.4 queries with only cosmetic modifications.
+ */
+trait Tpcds_2_4_Queries extends Benchmark {
+
+  import ExecutionMode._
+
+  val queryNames = Seq(
+    "q1",
+    "q2",
+    "q3",
+    "q4",
+    "q5",
+    "q6",
+    "q7",
+    "q8",
+    "q9",
+    "q10",
+    "q11",
+    "q12",
+    "q13",
+    "q14a",
+    "q14b",
+    "q15",
+    "q16",
+    "q17",
+    "q18",
+    "q19",
+    "q20",
+    "q21",
+    "q22",
+    "q23a",
+    "q23b",
+    "q24a",
+    "q24b",
+    "q25",
+    "q26",
+    "q27",
+    "q28",
+    "q29",
+    "q30",
+    "q31",
+    "q32",
+    "q33",
+    "q34",
+    "q35",
+    "q36",
+    "q37",
+    "q38",
+    "q39a",
+    "q39b",
+    "q40",
+    "q41",
+    "q42",
+    "q43",
+    "q44",
+    "q45",
+    "q46",
+    "q47",
+    "q48",
+    "q49",
+    "q50",
+    "q51",
+    "q52",
+    "q53",
+    "q54",
+    "q55",
+    "q56",
+    "q57",
+    "q58",
+    "q59",
+    "q60",
+    "q61",
+    "q62",
+    "q63",
+    "q64",
+    "q65",
+    "q66",
+    "q67",
+    "q68",
+    "q69",
+    "q70",
+    "q71",
+    "q72",
+    "q73",
+    "q74",
+    "q75",
+    "q76",
+    "q77",
+    "q78",
+    "q79",
+    "q80",
+    "q81",
+    "q82",
+    "q83",
+    "q84",
+    "q85",
+    "q86",
+    "q87",
+    "q88",
+    "q89",
+    "q90",
+    "q91",
+    "q92",
+    "q93",
+    "q94",
+    "q95",
+    "q96",
+    "q97",
+    "q98",
+    "q99",
+    "ss_max")
+
+  val tpcds2_4Queries = queryNames.map { queryName =>
+    val queryContent: String = IOUtils.toString(
+      getClass().getClassLoader().getResourceAsStream(s"tpcds_2_4/$queryName.sql"))
+    Query(
+      queryName + "-v2.4",
+      queryContent,
+      description = "TPCDS 2.4 Query",
+      executionMode = CollectResults)

Review comment:
       expose `executionMode` to cli args?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#discussion_r762696590



##########
File path: dev/kyuubi-tpcds/src/main/resources/tpcds_2_4/q1.sql
##########
@@ -0,0 +1,19 @@
+--q1.sql--

Review comment:
       Add ASF header to SQL files




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] ulysses-you closed pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
ulysses-you closed pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#discussion_r762694842



##########
File path: dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/benchmark/ExecutionMode.scala
##########
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.tpcds.benchmark
+
+/**
+ * Describes how a given Spark benchmark should be run (i.e. should the results be collected to
+ * the driver or just computed on the executors.
+ */
+trait ExecutionMode extends Serializable
+case object ExecutionMode {
+
+  /** Benchmark run by collecting queries results  (e.g. rdd.collect()) */
+  case object CollectResults extends ExecutionMode {
+    override def toString: String = "collect"
+  }
+
+  /** Benchmark run by iterating through the queries results rows (e.g. rdd.foreach(row => Unit)) */
+  case object ForeachResults extends ExecutionMode {
+    override def toString: String = "foreach"
+  }
+
+  /** Benchmark run by saving the output of each query as a parquet file. */
+  case class WriteParquet(location: String) extends ExecutionMode {
+    override def toString: String = "saveToParquet"
+  }
+
+  /**

Review comment:
       Add `WriteNoop`
   ```
   df.write.format("noop").mode(Overwrite).save()
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#discussion_r762722818



##########
File path: dev/kyuubi-tpcds/README.md
##########
@@ -0,0 +1,58 @@
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one or more
+ - contributor license agreements.  See the NOTICE file distributed with
+ - this work for additional information regarding copyright ownership.
+ - The ASF licenses this file to You under the Apache License, Version 2.0
+ - (the "License"); you may not use this file except in compliance with
+ - the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing, software
+ - distributed under the License is distributed on an "AS IS" BASIS,
+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ - See the License for the specific language governing permissions and
+ - limitations under the License.
+ -->
+
+# Introduction
+This module includes tpcds data generator and benchmark.
+
+# How to use
+
+package jar with following command:
+`./build/mvn install -DskipTests -Ptpcds -pl dev/kyuubi-tpcds -am`
+
+## data generator 
+Run following command to generate 10GB data with new database `tpcds_sf10`.
+
+```shell
+$SPARK_HOME/bin/spark-submit \
+  --conf spark.sql.tpcds.scale.factor=10 \

Review comment:
       can we have a table to describe all supported configs?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#issuecomment-986422247


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1496](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (91e7169) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/b87d206ffb5da16b7d7b7d401be053b0e78c7a99?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b87d206) will **increase** coverage by `0.22%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 91e7169 differs from pull request most recent head 54a146e. Consider uploading reports for the commit 54a146e to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1496      +/-   ##
   ============================================
   + Coverage     59.11%   59.33%   +0.22%     
     Complexity      172      172              
   ============================================
     Files           235      237       +2     
     Lines         12056    12136      +80     
     Branches       1479     1487       +8     
   ============================================
   + Hits           7127     7201      +74     
   - Misses         4323     4325       +2     
   - Partials        606      610       +4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...kyuubi/engine/spark/session/SparkSessionImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9zZXNzaW9uL1NwYXJrU2Vzc2lvbkltcGwuc2NhbGE=) | `94.73% <0.00%> (-5.27%)` | :arrow_down: |
   | [...ine/spark/operation/SparkSQLOperationManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vU3BhcmtTUUxPcGVyYXRpb25NYW5hZ2VyLnNjYWxh) | `82.50% <0.00%> (-4.17%)` | :arrow_down: |
   | [...ache/kyuubi/operation/KyuubiOperationManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uTWFuYWdlci5zY2FsYQ==) | `81.57% <0.00%> (-2.64%)` | :arrow_down: |
   | [...ubi/engine/spark/operation/PlanOnlyStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vUGxhbk9ubHlTdGF0ZW1lbnQuc2NhbGE=) | `75.86% <0.00%> (-0.81%)` | :arrow_down: |
   | [.../org/apache/kyuubi/session/KyuubiSessionImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXNzaW9uL0t5dXViaVNlc3Npb25JbXBsLnNjYWxh) | `84.21% <0.00%> (-0.52%)` | :arrow_down: |
   | [...e/kyuubi/engine/spark/operation/GetFunctions.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0RnVuY3Rpb25zLnNjYWxh) | `94.59% <0.00%> (-0.15%)` | :arrow_down: |
   | [...uubi/engine/spark/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.50% <0.00%> (-0.13%)` | :arrow_down: |
   | [...ache/kyuubi/engine/spark/operation/GetTables.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0VGFibGVzLnNjYWxh) | `97.36% <0.00%> (-0.07%)` | :arrow_down: |
   | [...che/kyuubi/engine/spark/operation/GetColumns.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0Q29sdW1ucy5zY2FsYQ==) | `98.52% <0.00%> (-0.03%)` | :arrow_down: |
   | [...che/kyuubi/engine/spark/operation/GetSchemas.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0U2NoZW1hcy5zY2FsYQ==) | `90.00% <0.00%> (ø)` | |
   | ... and [9 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [b87d206...54a146e](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] ulysses-you commented on a change in pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#discussion_r762720316



##########
File path: dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/benchmark/ExecutionMode.scala
##########
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.tpcds.benchmark
+
+/**
+ * Describes how a given Spark benchmark should be run (i.e. should the results be collected to
+ * the driver or just computed on the executors.
+ */
+trait ExecutionMode extends Serializable
+case object ExecutionMode {
+
+  /** Benchmark run by collecting queries results  (e.g. rdd.collect()) */
+  case object CollectResults extends ExecutionMode {
+    override def toString: String = "collect"
+  }
+
+  /** Benchmark run by iterating through the queries results rows (e.g. rdd.foreach(row => Unit)) */
+  case object ForeachResults extends ExecutionMode {
+    override def toString: String = "foreach"
+  }
+
+  /** Benchmark run by saving the output of each query as a parquet file. */
+  case class WriteParquet(location: String) extends ExecutionMode {
+    override def toString: String = "saveToParquet"
+  }
+
+  /**

Review comment:
       we can do this in a new PR if we really need them




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#issuecomment-986422247


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1496](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (54a146e) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/b87d206ffb5da16b7d7b7d401be053b0e78c7a99?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b87d206) will **increase** coverage by `0.28%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1496      +/-   ##
   ============================================
   + Coverage     59.11%   59.40%   +0.28%     
     Complexity      172      172              
   ============================================
     Files           235      237       +2     
     Lines         12056    12168     +112     
     Branches       1479     1492      +13     
   ============================================
   + Hits           7127     7228     +101     
   - Misses         4323     4330       +7     
   - Partials        606      610       +4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...kyuubi/engine/spark/session/SparkSessionImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9zZXNzaW9uL1NwYXJrU2Vzc2lvbkltcGwuc2NhbGE=) | `94.73% <0.00%> (-5.27%)` | :arrow_down: |
   | [...ine/spark/operation/SparkSQLOperationManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vU3BhcmtTUUxPcGVyYXRpb25NYW5hZ2VyLnNjYWxh) | `82.50% <0.00%> (-4.17%)` | :arrow_down: |
   | [...apache/kyuubi/server/api/v1/SessionsResource.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL3YxL1Nlc3Npb25zUmVzb3VyY2Uuc2NhbGE=) | `79.13% <0.00%> (-1.05%)` | :arrow_down: |
   | [...ubi/engine/spark/operation/PlanOnlyStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vUGxhbk9ubHlTdGF0ZW1lbnQuc2NhbGE=) | `75.86% <0.00%> (-0.81%)` | :arrow_down: |
   | [.../org/apache/kyuubi/session/KyuubiSessionImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXNzaW9uL0t5dXViaVNlc3Npb25JbXBsLnNjYWxh) | `84.21% <0.00%> (-0.52%)` | :arrow_down: |
   | [...e/kyuubi/engine/spark/operation/GetFunctions.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0RnVuY3Rpb25zLnNjYWxh) | `94.59% <0.00%> (-0.15%)` | :arrow_down: |
   | [...uubi/engine/spark/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.50% <0.00%> (-0.13%)` | :arrow_down: |
   | [...ache/kyuubi/engine/spark/operation/GetTables.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0VGFibGVzLnNjYWxh) | `97.36% <0.00%> (-0.07%)` | :arrow_down: |
   | [...che/kyuubi/engine/spark/operation/GetColumns.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0Q29sdW1ucy5zY2FsYQ==) | `98.52% <0.00%> (-0.03%)` | :arrow_down: |
   | [...che/kyuubi/engine/spark/operation/GetSchemas.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0U2NoZW1hcy5zY2FsYQ==) | `90.00% <0.00%> (ø)` | |
   | ... and [10 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [b87d206...54a146e](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#issuecomment-986422247


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1496](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d4afe2d) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/b87d206ffb5da16b7d7b7d401be053b0e78c7a99?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b87d206) will **increase** coverage by `0.26%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1496      +/-   ##
   ============================================
   + Coverage     59.11%   59.37%   +0.26%     
     Complexity      172      172              
   ============================================
     Files           235      237       +2     
     Lines         12056    12168     +112     
     Branches       1479     1492      +13     
   ============================================
   + Hits           7127     7225      +98     
   - Misses         4323     4331       +8     
   - Partials        606      612       +6     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...kyuubi/engine/spark/session/SparkSessionImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9zZXNzaW9uL1NwYXJrU2Vzc2lvbkltcGwuc2NhbGE=) | `94.73% <0.00%> (-5.27%)` | :arrow_down: |
   | [...ine/spark/operation/SparkSQLOperationManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vU3BhcmtTUUxPcGVyYXRpb25NYW5hZ2VyLnNjYWxh) | `82.50% <0.00%> (-4.17%)` | :arrow_down: |
   | [...ache/kyuubi/operation/KyuubiOperationManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uTWFuYWdlci5zY2FsYQ==) | `81.57% <0.00%> (-2.64%)` | :arrow_down: |
   | [...apache/kyuubi/server/api/v1/SessionsResource.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL3YxL1Nlc3Npb25zUmVzb3VyY2Uuc2NhbGE=) | `79.13% <0.00%> (-1.05%)` | :arrow_down: |
   | [...ubi/engine/spark/operation/PlanOnlyStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vUGxhbk9ubHlTdGF0ZW1lbnQuc2NhbGE=) | `75.86% <0.00%> (-0.81%)` | :arrow_down: |
   | [.../org/apache/kyuubi/session/KyuubiSessionImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXNzaW9uL0t5dXViaVNlc3Npb25JbXBsLnNjYWxh) | `84.21% <0.00%> (-0.52%)` | :arrow_down: |
   | [...e/kyuubi/engine/spark/operation/GetFunctions.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0RnVuY3Rpb25zLnNjYWxh) | `94.59% <0.00%> (-0.15%)` | :arrow_down: |
   | [...uubi/engine/spark/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.50% <0.00%> (-0.13%)` | :arrow_down: |
   | [...ache/kyuubi/engine/spark/operation/GetTables.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0VGFibGVzLnNjYWxh) | `97.36% <0.00%> (-0.07%)` | :arrow_down: |
   | [...che/kyuubi/engine/spark/operation/GetColumns.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0Q29sdW1ucy5zY2FsYQ==) | `98.52% <0.00%> (-0.03%)` | :arrow_down: |
   | ... and [11 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [b87d206...d4afe2d](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] ulysses-you commented on a change in pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#discussion_r762720609



##########
File path: dev/kyuubi-tpcds/pom.xml
##########
@@ -43,6 +43,22 @@
             <artifactId>spark-sql_${scala.binary.version}</artifactId>
             <scope>provided</scope>
         </dependency>
+
+        <dependency>
+            <groupId>com.github.scopt</groupId>
+            <artifactId>scopt_2.12</artifactId>

Review comment:
       fixed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] ulysses-you commented on pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#issuecomment-986715116


   thanks, merging to master


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#discussion_r762695094



##########
File path: dev/kyuubi-tpcds/README.md
##########
@@ -0,0 +1,58 @@
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one or more
+ - contributor license agreements.  See the NOTICE file distributed with
+ - this work for additional information regarding copyright ownership.
+ - The ASF licenses this file to You under the Apache License, Version 2.0
+ - (the "License"); you may not use this file except in compliance with
+ - the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing, software
+ - distributed under the License is distributed on an "AS IS" BASIS,
+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ - See the License for the specific language governing permissions and
+ - limitations under the License.
+ -->
+
+# Introduction
+This module includes tpcds data generator and benchmark.
+
+# How to use
+
+package jar with following command:
+`./build/mvn install -DskipTests -Ptpcds -pl dev/kyuubi-tpcds -am`
+
+## data generator 
+Run following command to generate 10GB data with new database `tpcds_sf10`.
+
+```shell
+$SPARK_HOME/bin/spark-submit \
+  --conf spark.sql.tpcds.scale.factor=10 \
+  --conf spark.sql.tpcds.database=tpcds_sf10 \

Review comment:
       Unify the arg parser, migrate to scopt




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#discussion_r762725226



##########
File path: dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/benchmark/RunBenchmark.scala
##########
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.tpcds.benchmark
+
+import java.io.File
+import java.net.InetAddress
+
+import org.apache.spark.SparkConf
+import org.apache.spark.sql.SparkSession
+import org.apache.spark.sql.functions._
+
+case class RunConfig(
+    db: String = null,
+    benchmarkName: String = "tpcds-v2.4-benchmark",
+    filter: Option[String] = None,
+    iterations: Int = 3)
+
+// scalastyle:off
+/**
+ * Usage:
+ * <p>
+ * Run following command to benchmark tpcds sf10 with exists database `tpcds_sf10`.
+ * {{{
+ *   $SPARK_HOME/bin/spark-submit --class org.apache.kyuubi.tpcds.benchmark.RunBenchmark kyuubi-tpcds-*.jar --db tpcds_sf10
+ * }}}
+ */
+object RunBenchmark {
+  def main(args: Array[String]): Unit = {
+    val parser = new scopt.OptionParser[RunConfig]("tpcds-benchmark") {
+      head("tpcds-benchmark", "")
+      opt[String]('d', "db")
+        .action { (x, c) => c.copy(db = x) }
+        .text("the test data location")
+        .required()
+      opt[String]('b', "benchmark")
+        .action { (x, c) => c.copy(benchmarkName = x) }
+        .text("the name of the benchmark to run")
+      opt[String]('f', "filter")
+        .action((x, c) => c.copy(filter = Some(x)))
+        .text("a filter on the name of the queries to run")
+      opt[Int]('i', "iterations")
+        .action((x, c) => c.copy(iterations = x))
+        .text("the number of iterations to run")
+      help("help")
+        .text("prints this usage text")
+    }
+
+    parser.parse(args, RunConfig()) match {
+      case Some(config) =>
+        run(config)
+      case None =>
+        System.exit(1)
+    }
+  }
+
+  def run(config: RunConfig): Unit = {
+    val conf = new SparkConf()
+      .setAppName(config.benchmarkName)
+
+    val sparkSession = SparkSession.builder.config(conf).enableHiveSupport().getOrCreate()
+    val sqlContext = sparkSession.sqlContext

Review comment:
       why we have to keep the legacy `sqlContext`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1496: Support tpcds benchmark

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1496:
URL: https://github.com/apache/incubator-kyuubi/pull/1496#issuecomment-986422247


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1496](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (54a146e) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/b87d206ffb5da16b7d7b7d401be053b0e78c7a99?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b87d206) will **increase** coverage by `0.28%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 54a146e differs from pull request most recent head d4afe2d. Consider uploading reports for the commit d4afe2d to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1496      +/-   ##
   ============================================
   + Coverage     59.11%   59.40%   +0.28%     
     Complexity      172      172              
   ============================================
     Files           235      237       +2     
     Lines         12056    12168     +112     
     Branches       1479     1492      +13     
   ============================================
   + Hits           7127     7228     +101     
   - Misses         4323     4330       +7     
   - Partials        606      610       +4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...kyuubi/engine/spark/session/SparkSessionImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9zZXNzaW9uL1NwYXJrU2Vzc2lvbkltcGwuc2NhbGE=) | `94.73% <0.00%> (-5.27%)` | :arrow_down: |
   | [...ine/spark/operation/SparkSQLOperationManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vU3BhcmtTUUxPcGVyYXRpb25NYW5hZ2VyLnNjYWxh) | `82.50% <0.00%> (-4.17%)` | :arrow_down: |
   | [...apache/kyuubi/server/api/v1/SessionsResource.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL3YxL1Nlc3Npb25zUmVzb3VyY2Uuc2NhbGE=) | `79.13% <0.00%> (-1.05%)` | :arrow_down: |
   | [...ubi/engine/spark/operation/PlanOnlyStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vUGxhbk9ubHlTdGF0ZW1lbnQuc2NhbGE=) | `75.86% <0.00%> (-0.81%)` | :arrow_down: |
   | [.../org/apache/kyuubi/session/KyuubiSessionImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXNzaW9uL0t5dXViaVNlc3Npb25JbXBsLnNjYWxh) | `84.21% <0.00%> (-0.52%)` | :arrow_down: |
   | [...e/kyuubi/engine/spark/operation/GetFunctions.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0RnVuY3Rpb25zLnNjYWxh) | `94.59% <0.00%> (-0.15%)` | :arrow_down: |
   | [...uubi/engine/spark/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.50% <0.00%> (-0.13%)` | :arrow_down: |
   | [...ache/kyuubi/engine/spark/operation/GetTables.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0VGFibGVzLnNjYWxh) | `97.36% <0.00%> (-0.07%)` | :arrow_down: |
   | [...che/kyuubi/engine/spark/operation/GetColumns.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0Q29sdW1ucy5zY2FsYQ==) | `98.52% <0.00%> (-0.03%)` | :arrow_down: |
   | [...che/kyuubi/engine/spark/operation/GetSchemas.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9vcGVyYXRpb24vR2V0U2NoZW1hcy5zY2FsYQ==) | `90.00% <0.00%> (ø)` | |
   | ... and [10 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [b87d206...d4afe2d](https://codecov.io/gh/apache/incubator-kyuubi/pull/1496?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org