cfmcgrady commented on a change in pull request #1391:
URL: https://github.com/apache/incubator-kyuubi/pull/1391#discussion_r753915741
##########
File path:
dev/kyuubi-extension-spark-3-1/src/main/scala/org/apache/kyuubi/sql/watchdog/MaxHivePartitionStrategy.scala
##########
@@ -50,12 +51,14 @@ case class MaxHivePartitionStrategy(session: SparkSession)
|Owner: ${relation.tableMeta.owner}
|Partition Structure:
${relation.partitionCols.map(_.name).mkString(" -> ")}
|""".stripMargin)
- } else {
- Nil
- }
- case _ => val totalPartitions = session
- .sessionState.catalog.externalCatalog.listPartitionNames(
- relation.tableMeta.database,
relation.tableMeta.identifier.table)
+ } else {
+ Nil
+ }
+ case _ =>
+ val totalPartitions = session
+ .sessionState.catalog.externalCatalog.listPartitionNames(
+ relation.tableMeta.database,
+ relation.tableMeta.identifier.table)
Review comment:
indent of L65-71, 2 space
##########
File path:
dev/kyuubi-extension-spark-common/src/test/scala/org/apache/spark/sql/InsertShuffleNodeBeforeJoinSuite.scala
##########
@@ -59,15 +61,17 @@ class InsertShuffleNodeBeforeJoinSuite extends
KyuubiSparkSQLExtensionTest {
|SELECT /*+ $joinHint(t2, t3) */ t1.c1, t1.c2, t2.c1, t3.c1 from
t1
Review comment:
indent of L61-64
##########
File path:
dev/kyuubi-extension-spark-common/src/main/scala/org/apache/kyuubi/sql/zorder/ZorderBase.scala
##########
@@ -77,8 +77,9 @@ abstract class ZorderBase extends Expression {
|}
|""".stripMargin
}
- ev.copy(code =
- code"""
+ ev.copy(
+ code =
+ code"""
Review comment:
indent of L83-87
##########
File path:
dev/kyuubi-extension-spark-3-1/src/test/scala/org/apache/spark/sql/WatchDogSuite.scala
##########
@@ -72,9 +72,9 @@ class WatchDogSuite extends KyuubiSparkSQLExtensionTest {
withSQLConf(KyuubiSQLConf.WATCHDOG_FORCED_MAXOUTPUTROWS.key -> "10") {
List("", "ORDER BY c1", "ORDER BY c2").foreach { sort =>
- List("", " DISTINCT").foreach{ distinct =>
- assert(sql(
- s"""
+ List("", " DISTINCT").foreach { distinct =>
+ assert(sql(
+ s"""
Review comment:
indent of L78-81
##########
File path:
dev/kyuubi-extension-spark-3-1/src/main/scala/org/apache/kyuubi/sql/watchdog/MaxHivePartitionStrategy.scala
##########
@@ -37,11 +37,12 @@ case class MaxHivePartitionStrategy(session: SparkSession)
override def apply(plan: LogicalPlan): Seq[SparkPlan] = {
conf.getConf(KyuubiSQLConf.WATCHDOG_MAX_HIVEPARTITION) match {
case Some(maxHivePartition) => plan match {
- case ScanOperation(_, _, relation: HiveTableRelation) if
relation.isPartitioned =>
+ case ScanOperation(_, _, relation: HiveTableRelation) if
relation.isPartitioned =>
relation.prunedPartitions match {
- case Some(prunedPartitions) => if (prunedPartitions.size >
maxHivePartition) {
- throw new MaxHivePartitionExceedException(
- s"""
+ case Some(prunedPartitions) =>
+ if (prunedPartitions.size > maxHivePartition) {
+ throw new MaxHivePartitionExceedException(
+ s"""
|SQL job scan hive partition: ${prunedPartitions.size}
Review comment:
indent, 2 space
##########
File path:
dev/kyuubi-extension-spark-3-1/src/test/scala/org/apache/spark/sql/WatchDogSuite.scala
##########
@@ -84,15 +84,14 @@ class WatchDogSuite extends KyuubiSparkSQLExtensionTest {
limitAndExpecteds.foreach { case LimitAndExpected(limit, expected) =>
List("", "ORDER BY c1", "ORDER BY c2").foreach { sort =>
- List("", "DISTINCT").foreach{ distinct =>
+ List("", "DISTINCT").foreach { distinct =>
assert(sql(
s"""
|SELECT $distinct *
Review comment:
indent of L90-94
##########
File path:
dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/DataGenerator.scala
##########
@@ -51,7 +51,9 @@ object DataGenerator {
import spark.implicits._
- val catalog_sales: TableGenerator = TableGenerator("catalog_sales",
+ // format: off
Review comment:
what's `// format: off` mean?
##########
File path:
dev/kyuubi-extension-spark-common/src/test/scala/org/apache/spark/sql/InsertShuffleNodeBeforeJoinSuite.scala
##########
@@ -59,15 +61,17 @@ class InsertShuffleNodeBeforeJoinSuite extends
KyuubiSparkSQLExtensionTest {
|SELECT /*+ $joinHint(t2, t3) */ t1.c1, t1.c2, t2.c1, t3.c1 from
t1
| JOIN t2 ON t1.c1 = t2.c1
| JOIN t3 ON t1.c1 = t3.c1
- | """.stripMargin, 4)
+ | """.stripMargin,
+ 4)
// negative case
checkShuffleNodeNum(
s"""
|SELECT /*+ $joinHint(t2, t3) */ t1.c1, t1.c2, t2.c1, t3.c1 from
t1
Review comment:
indent
##########
File path:
dev/kyuubi-tpcds/src/main/scala/org/apache/kyuubi/tpcds/TableGenerator.scala
##########
@@ -131,19 +132,21 @@ case class TableGenerator(
}
def create(): Unit = {
- val data = if (partitionCols.isEmpty) {
- toDF.repartition(radix)
- } else {
- toDF.persist()
- }
+ val data =
+ if (partitionCols.isEmpty) {
+ toDF.repartition(radix)
+ } else {
+ toDF.persist()
+ }
val tempViewName = s"${name}_view"
data.createOrReplaceTempView(tempViewName)
- val writer = if (partitionCols.nonEmpty) {
- val query =
- s"""
+ val writer =
+ if (partitionCols.nonEmpty) {
+ val query =
+ s"""
|(SELECT
Review comment:
indent
##########
File path:
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/KyuubiSparkUtil.scala
##########
@@ -37,6 +37,7 @@ object KyuubiSparkUtil {
"spark.org.apache.hadoop.yarn.server.webproxy.amfilter.AmIpFilter.param.PROXY_URI_BASES")
.orElse(sc.uiWebUrl).getOrElse("")
// scalastyle:off line.size.limit
+ // format: off
s"""
Review comment:
indent
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]