[GitHub] [spark] HyukjinKwon commented on a change in pull request #28825: [SPARk-31950][SQL][FOLLOW-UP][MINOR] Better error message on SPARK_HOME or…
HyukjinKwon commented on a change in pull request #28825: URL: https://github.com/apache/spark/pull/28825#discussion_r441933345 ## File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/SQLHelper.scala ## @@ -83,4 +85,11 @@ trait SQLHelper { } } } + + def getSparkHome(): String = { Review comment: I think you could even make it a `lazy val` can call it `sparkHome` I guess but shouldn't be a big deal. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #28825: [SPARk-31950][SQL][FOLLOW-UP][MINOR] Better error message on SPARK_HOME or…
HyukjinKwon commented on a change in pull request #28825: URL: https://github.com/apache/spark/pull/28825#discussion_r441932959 ## File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/SQLHelper.scala ## @@ -21,6 +21,8 @@ import java.time.ZoneId import scala.util.control.NonFatal +import org.scalatest.Assertions._ Review comment: We could probably explicitly import what we need. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #28825: [SPARk-31950][SQL][FOLLOW-UP][MINOR] Better error message on SPARK_HOME or…
HyukjinKwon commented on a change in pull request #28825: URL: https://github.com/apache/spark/pull/28825#discussion_r441932726 ## File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/TableIdentifierParserSuite.scala ## @@ -26,7 +24,7 @@ import org.apache.spark.sql.catalyst.plans.SQLHelper import org.apache.spark.sql.catalyst.util.fileToString import org.apache.spark.sql.internal.SQLConf -class TableIdentifierParserSuite extends SparkFunSuite with SQLHelper { +class TableIdentifierParserSuite extends SparkFunSuite with SQLHelper { Review comment: nit there's one more space here .. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] [spark] HyukjinKwon commented on a change in pull request #28825: [SPARk-31950][SQL][FOLLOW-UP][MINOR] Better error message on SPARK_HOME or…
HyukjinKwon commented on a change in pull request #28825: URL: https://github.com/apache/spark/pull/28825#discussion_r439889900 ## File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala ## @@ -135,8 +134,9 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession { // 1. Maven can't get correct resource directory when resources in other jars. // 2. We test subclasses in the hive-thriftserver module. val sparkHome = { - assert(sys.props.contains("spark.test.home") || -sys.env.contains("SPARK_HOME"), "spark.test.home or SPARK_HOME is not set.") + if (!(sys.props.contains("spark.test.home") || sys.env.contains("SPARK_HOME"))) { +fail("spark.test.home or SPARK_HOME is not set.") + } sys.props.getOrElse("spark.test.home", sys.env("SPARK_HOME")) } Review comment: Yeah, let's do that. There look two more occurrences. ``` sql/core/src/test/scala/org/apache/spark/sql/ExpressionsSchemaSuite.scala: assert(sys.props.contains("spark.test.home") || sql/core/src/test/scala/org/apache/spark/sql/IntegratedUDFTestUtils.scala: assert(sys.props.contains("spark.test.home") || ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org