hidataplus commented on code in PR #48823: URL: https://github.com/apache/spark/pull/48823#discussion_r1986020465
########## sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala: ########## @@ -177,8 +179,10 @@ private[hive] class HiveClientImpl( // got changed. We reset it to clientLoader.ClassLoader here. state.getConf.setClassLoader(clientLoader.classLoader) shim.setCurrentSessionState(state) - state.out = new PrintStream(outputBuffer, true, UTF_8.name()) - state.err = new PrintStream(outputBuffer, true, UTF_8.name()) + val clz = state.getClass.getField("out").getType.asInstanceOf[Class[_ <: PrintStream]] + val ctor = clz.getConstructor(classOf[OutputStream], classOf[Boolean], classOf[String]) + state.getClass.getField("out").set(state, ctor.newInstance(outputBuffer, true, UTF_8.name())) Review Comment: build fail : ”the result type of an implicit conversion must be more specific than Object“ -- 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: reviews-unsubscr...@spark.apache.org 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