Hisoka-X commented on code in PR #40564:
URL: https://github.com/apache/spark/pull/40564#discussion_r1151336880
##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/ClientE2ETestSuite.scala:
##########
@@ -683,7 +770,7 @@ class ClientE2ETestSuite extends RemoteSparkSession with
SQLHelper {
checkSameResult(list.asScala, session.createDataset(list))
checkSameResult(
list.asScala.map(kv => Row(kv.key, kv.value)),
- session.createDataFrame(list.asScala.toSeq))
+ session.createDataFrame(list.asScala))
Review Comment:
Thanks. Done
##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/client/util/IntegrationTestUtils.scala:
##########
@@ -65,29 +65,38 @@ object IntegrationTestUtils {
* @return
* the jar
*/
- private[sql] def findJar(path: String, sbtName: String, mvnName: String):
File = {
+ private[sql] def findJar(
+ path: String,
+ sbtName: String,
+ mvnName: String,
+ test: Boolean): File = {
val targetDir = new File(new File(sparkHome, path), "target")
assert(
targetDir.exists(),
s"Fail to locate the target folder: '${targetDir.getCanonicalPath}'. " +
s"SPARK_HOME='${new File(sparkHome).getCanonicalPath}'. " +
"Make sure the spark project jars has been built (e.g. using build/sbt
package)" +
"and the env variable `SPARK_HOME` is set correctly.")
+ val suffix = if (test) "-tests.jar" else ".jar"
val jars = recursiveListFiles(targetDir).filter { f =>
// SBT jar
(f.getParentFile.getName == scalaDir &&
- f.getName.startsWith(sbtName) && f.getName.endsWith(".jar")) ||
+ f.getName.startsWith(sbtName) && f.getName.endsWith(suffix)) ||
// Maven Jar
(f.getParent.endsWith("target") &&
f.getName.startsWith(mvnName) &&
- f.getName.endsWith(s"${org.apache.spark.SPARK_VERSION}.jar"))
+ f.getName.endsWith(s"${org.apache.spark.SPARK_VERSION}$suffix"))
}
// It is possible we found more than one: one built by maven, and another
by SBT
assert(jars.nonEmpty, s"Failed to find the jar inside folder:
${targetDir.getCanonicalPath}")
debug("Using jar: " + jars(0).getCanonicalPath)
jars(0) // return the first jar found
}
+ private[sql] def findJar(path: String, sbtName: String, mvnName: String):
File = {
Review Comment:
Thanks. Done
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]