From 4d15f6465b7a163d04dcec7ec748c78e1217d0fb Mon Sep 17 00:00:00 2001 From: Dima Date: Thu, 20 Feb 2025 11:03:37 +0800 Subject: [PATCH] [SPARK-51219][SQL][TESTS][FOLLOWUP] ShowTablesExec` remove `ArrayImplicits` ### What changes were proposed in this pull request? Related to https://github.com/apache/spark/pull/49144. scala 2.12 is failing with `ArrayImplicits`, which is in use for `ShowTablesExec.isTempView` method. This PR removes `org.apache.spark.util.ArrayImplicits._` from `ShowTablesExec` and uses default Seq instead. ### Why are the changes needed? To fix failing scala 2.12 compilation isssu. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Existing init tests and actions run. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #50008 from ostronaut/features/ShowTablesExec-remove-ArrayImplicits. Authored-by: Dima Signed-off-by: Wenchen Fan --- .../spark/sql/execution/datasources/v2/ShowTablesExec.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ShowTablesExec.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ShowTablesExec.scala index f314dfd791195..3232bf5ac016c 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ShowTablesExec.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ShowTablesExec.scala @@ -25,7 +25,6 @@ import org.apache.spark.sql.catalyst.util.StringUtils import org.apache.spark.sql.connector.catalog.{CatalogV2Util, Identifier, TableCatalog} import org.apache.spark.sql.connector.catalog.CatalogV2Implicits.NamespaceHelper import org.apache.spark.sql.execution.LeafExecNode -import org.apache.spark.util.ArrayImplicits._ /** * Physical plan node for showing tables. @@ -50,8 +49,7 @@ case class ShowTablesExec( private def isTempView(ident: Identifier, catalog: TableCatalog): Boolean = { if (CatalogV2Util.isSessionCatalog(catalog)) { - session.sessionState.catalog - .isTempView((ident.namespace() :+ ident.name()).toImmutableArraySeq) + session.sessionState.catalog.isTempView(ident.namespace() :+ ident.name()) } else false } }