Skip to content

Commit

Permalink
[SPARK-51219][SQL][TESTS][FOLLOWUP] ShowTablesExec remove ArrayImpl…
Browse files Browse the repository at this point in the history
…icits`

Related to #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.

To fix failing scala 2.12 compilation isssu.

No

Existing init tests and actions run.

No.

Closes #50008 from ostronaut/features/ShowTablesExec-remove-ArrayImplicits.

Authored-by: Dima <dimanowq@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 4d15f64)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
  • Loading branch information
ostronaut authored and cloud-fan committed Feb 20, 2025
1 parent b9c96c7 commit 60e1d4a
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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()).toSeq)
} else false
}
}

0 comments on commit 60e1d4a

Please sign in to comment.