dongjoon-hyun commented on a change in pull request #32583:
URL: https://github.com/apache/spark/pull/32583#discussion_r735202603
##########
File path:
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala
##########
@@ -888,25 +892,81 @@ private[client] class Shim_v0_13 extends Shim_v0_12 {
// occurs and the
config`spark.sql.hive.metastorePartitionPruningFallbackOnException` is
// enabled.
getPartitionsByFilterMethod.invoke(hive, table, filter)
- .asInstanceOf[JArrayList[Partition]]
+ .asInstanceOf[JArrayList[Partition]].asScala.toSeq
} catch {
case ex: InvocationTargetException if
ex.getCause.isInstanceOf[MetaException] &&
shouldFallback =>
logWarning("Caught Hive MetaException attempting to get partition
metadata by " +
"filter from Hive. Falling back to fetching all partition
metadata, which will " +
"degrade performance. Modifying your Hive metastore
configuration to set " +
s"${tryDirectSqlConfVar.varname} to true (if it is not true
already) may resolve " +
- "this problem. Otherwise, to avoid degraded performance you can
set " +
+ "this problem. Or you can enable " +
+ s"${SQLConf.HIVE_METASTORE_PARTITION_PRUNING_FAST_FALLBACK.key}
" +
+ "to alleviate performance downgrade." +
Review comment:
nit. We need a space at the end.
--
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]