You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/06/02 07:27:49 UTC

[GitHub] [spark] LuciferYang commented on a change in pull request #32693: [SPARK-35556][SQL][TESTS] Avoid log NoSuchMethodError when running multiple Hive version related tests

LuciferYang commented on a change in pull request #32693:
URL: https://github.com/apache/spark/pull/32693#discussion_r643721982



##########
File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
##########
@@ -165,9 +165,15 @@ private[hive] class HiveClientImpl(
       state.getTmpOutputFile.delete()
       state.setTmpOutputFile(null)
     }
-    if (state.getTmpErrOutputFile != null) {
-      state.getTmpErrOutputFile.delete()
-      state.setTmpErrOutputFile(null)
+    // SPARK-35556: there are some UTs testing multiple versions of hive such as
+    // `org.apache.spark.sql.hive.client.VersionsSuite`, so we need to ensure that
+    // the `getTmpErrOutputFile` method exists in the hive version being tested,
+    // because the `getTmpErrOutputFile` method was added after hive 2.0.
+    if (state.getClass.getMethods.exists(_.getName == "getTmpErrOutputFile")) {

Review comment:
       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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org