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 2020/11/11 05:04:43 UTC

[GitHub] [spark] maropu commented on a change in pull request #30325: [SPARK-33416][SQL] Avoid Hive metastore stack overflow when InSet predicate have many values

maropu commented on a change in pull request #30325:
URL: https://github.com/apache/spark/pull/30325#discussion_r521115188



##########
File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveExternalCatalog.scala
##########
@@ -1267,9 +1267,19 @@ private[spark] class HiveExternalCatalog(conf: SparkConf, hadoopConf: Configurat
     val catalogTable = restoreTableMetadata(rawTable)
 
     val partColNameMap = buildLowerCasePartColNameMap(catalogTable)
+    val hivePredicates = predicates.map {
+      // Avoid Hive metastore stack overflow.
+      case InSet(child, values)

Review comment:
       Any reason to rewrite catalyst exprs instead of generating a predicate string directly in the HiveShim side? Seems generating it directly can avoid the object generation for rewriting predicates.
   https://github.com/apache/spark/blob/5197c5d2e7648d75def3e159e0d2aa3e20117105/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala#L722-L724 




----------------------------------------------------------------
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