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/01/08 11:59:56 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #31092: [SPARK-34048][SQL][TESTS] Check the amount of calls to Hive external catalog

MaxGekk commented on a change in pull request #31092:
URL: https://github.com/apache/spark/pull/31092#discussion_r553904361



##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableRenamePartitionSuite.scala
##########
@@ -25,4 +25,20 @@ import org.apache.spark.sql.execution.command.v1
  */
 class AlterTableRenamePartitionSuite
   extends v1.AlterTableRenamePartitionSuiteBase
-  with CommandSuiteBase
+  with CommandSuiteBase {
+
+  test("hive client calls") {
+    withNamespaceAndTable("ns", "tbl") { t =>
+      sql(s"CREATE TABLE $t (id int, part int) $defaultUsing PARTITIONED BY (part)")
+      sql(s"INSERT INTO $t PARTITION (part=0) SELECT 0")
+
+      checkHiveClientCalls(expected = 21) {

Review comment:
       The number is huge because there are a lot of checks like the same table exists (repeats many times) and loading of the table/its metadata from Hive catalog.




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