LuciferYang commented on a change in pull request #32693:
URL: https://github.com/apache/spark/pull/32693#discussion_r642442840
##########
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:
cc @yaooqinn Do you have any better suggestions
--
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]