This is an automated email from the ASF dual-hosted git repository.
gengliangwang pushed a commit to branch branch-4.x
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-4.x by this push:
new 1cfc2ef5adf8 [SPARK-60965][SQL] Make code for excluding tables from
shared relation cache generic
1cfc2ef5adf8 is described below
commit 1cfc2ef5adf85fcd6417d0cbe56bb093b8534891
Author: Anton Okolnychyi <[email protected]>
AuthorDate: Tue Nov 10 12:10:50 2026 -0800
[SPARK-60965][SQL] Make code for excluding tables from shared relation
cache generic
### What changes were proposed in this pull request?
This PR replaces the hardcoded `ChangelogTable` check in the shared
relation cache with a generic marker, and simplifies the cache lookup.
### Why are the changes needed?
Before this change, `CacheManager` knew about one specific table type. A
generic marker lets any table that cannot stand in for a plain read of its
identifier opt out without editing `CacheManager`. Merging the lookup also
removes the split of matching conditions across two methods, including a
redundant name check and the resolver it needed.
### Does this PR introduce _any_ user-facing change?
No. All affected APIs are `private[sql]`, and lookups return the same
relations as before.
### How was this patch tested?
This PR comes with tests.
### Was this patch authored or co-authored using generative AI tooling?
Yes (Claude Opus 5.5).
Closes #60229 from aokolnychyi/spark-60965.
Authored-by: Anton Okolnychyi <[email protected]>
Signed-off-by: Gengliang Wang <[email protected]>
(cherry picked from commit 44b642cc8d74350da951409421687f589370eedd)
Signed-off-by: Gengliang Wang <[email protected]>
skip-checks: true
---
.../sql/catalyst/analysis/RelationCache.scala | 11 +++-
.../sql/catalyst/analysis/RelationResolution.scala | 2 +-
.../sql/connector/catalog/CatalogV2Util.scala | 12 ++--
.../execution/datasources/v2/ChangelogTable.scala | 3 +-
.../apache/spark/sql/execution/CacheManager.scala | 62 +++++++------------
.../datasources/v2/V2TableRefreshUtil.scala | 5 +-
.../apache/spark/sql/internal/SharedState.scala | 4 +-
.../org/apache/spark/sql/CachedTableSuite.scala | 6 +-
.../sql/connector/ChangelogResolutionSuite.scala | 72 ++++++++++++++++++++++
.../sql/connector/DataSourceV2OptionSuite.scala | 4 +-
.../execution/command/PlanResolutionSuite.scala | 6 +-
11 files changed, 121 insertions(+), 66 deletions(-)
diff --git
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/RelationCache.scala
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/RelationCache.scala
index 7c34ad8911f6..1ff254eb77e3 100644
---
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/RelationCache.scala
+++
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/RelationCache.scala
@@ -26,10 +26,15 @@ private[sql] trait RelationCache {
catalog: CatalogPlugin,
ident: Identifier,
tableId: Option[String],
- stateOptions: CaseInsensitiveStringMap,
- resolver: Resolver): Option[LogicalPlan]
+ stateOptions: CaseInsensitiveStringMap): Option[LogicalPlan]
}
private[sql] object RelationCache {
- val empty: RelationCache = (_, _, _, _, _) => None
+ val empty: RelationCache = (_, _, _, _) => None
}
+
+/**
+ * A marker interface for tables whose cached relations must not be returned
by shared relation
+ * cache lookups for their identifier, e.g. the built-in changelog table.
+ */
+private[sql] trait RelationCacheIneligible
diff --git
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/RelationResolution.scala
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/RelationResolution.scala
index 762f1eb6e54d..39a227bb0a43 100644
---
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/RelationResolution.scala
+++
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/RelationResolution.scala
@@ -405,7 +405,7 @@ class RelationResolution(
table: Table,
stateOptions: CaseInsensitiveStringMap): Option[DataSourceV2Relation] = {
CatalogV2Util.lookupCachedRelationWithStateOptions(
- sharedRelationCache, catalog, ident, table, stateOptions, conf)
+ sharedRelationCache, catalog, ident, table, stateOptions)
}
private def adaptCachedRelation(cached: LogicalPlan, planId: Option[Long]):
LogicalPlan = {
diff --git
a/sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogV2Util.scala
b/sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogV2Util.scala
index 68ddd2b34360..af0a1aabbdad 100644
---
a/sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogV2Util.scala
+++
b/sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogV2Util.scala
@@ -656,14 +656,10 @@ private[sql] object CatalogV2Util {
catalog: CatalogPlugin,
ident: Identifier,
table: Table,
- stateOptions: CaseInsensitiveStringMap,
- conf: SQLConf): Option[DataSourceV2Relation] = {
- cache.lookup(
- catalog,
- ident,
- Some(table.id),
- stateOptions,
- conf.resolver).collect { case r: DataSourceV2Relation => r }
+ stateOptions: CaseInsensitiveStringMap): Option[DataSourceV2Relation] = {
+ cache.lookup(catalog, ident, Some(table.id), stateOptions).collect {
+ case r: DataSourceV2Relation => r
+ }
}
def isSessionCatalog(catalog: CatalogPlugin): Boolean = {
diff --git
a/sql/catalyst/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ChangelogTable.scala
b/sql/catalyst/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ChangelogTable.scala
index 35496830289f..e41bc701ce07 100644
---
a/sql/catalyst/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ChangelogTable.scala
+++
b/sql/catalyst/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ChangelogTable.scala
@@ -19,6 +19,7 @@ package org.apache.spark.sql.execution.datasources.v2
import java.util.{EnumSet => JEnumSet, Set => JSet}
+import org.apache.spark.sql.catalyst.analysis.RelationCacheIneligible
import org.apache.spark.sql.connector.catalog.{Changelog, ChangelogContext,
Column, Identifier, SupportsRead, Table, TableCapability, TableCatalog}
import org.apache.spark.sql.connector.catalog.ChangelogRange.{TimestampRange,
UnboundedRange, VersionRange}
import org.apache.spark.sql.connector.catalog.TableCapability.{BATCH_READ,
MICRO_BATCH_READ}
@@ -37,7 +38,7 @@ import org.apache.spark.sql.util.CaseInsensitiveStringMap
case class ChangelogTable(
changelog: Changelog,
changelogContext: ChangelogContext,
- resolved: Boolean = false) extends Table with SupportsRead {
+ resolved: Boolean = false) extends Table with SupportsRead with
RelationCacheIneligible {
// Capture the metadata used to build the analyzer's CDC post-processing
operators.
private val containsCarryoverRows = changelog.containsCarryoverRows()
diff --git
a/sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala
b/sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala
index ec8c4dca7995..a3dfbf8f78da 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/CacheManager.scala
@@ -25,7 +25,7 @@ import org.apache.hadoop.fs.{FileSystem, Path}
import org.apache.spark.SparkException
import org.apache.spark.internal.{Logging, MessageWithContext}
import org.apache.spark.internal.LogKeys._
-import org.apache.spark.sql.catalyst.analysis.Resolver
+import org.apache.spark.sql.catalyst.analysis.{RelationCacheIneligible,
Resolver}
import org.apache.spark.sql.catalyst.catalog.HiveTableRelation
import org.apache.spark.sql.catalyst.expressions.{Attribute,
SubqueryExpression}
import org.apache.spark.sql.catalyst.optimizer.EliminateResolvedHint
@@ -34,7 +34,7 @@ import
org.apache.spark.sql.catalyst.trees.TreePattern.PLAN_EXPRESSION
import org.apache.spark.sql.catalyst.util.sideBySide
import org.apache.spark.sql.classic.{Dataset, SparkSession}
import org.apache.spark.sql.connector.catalog.{CatalogPlugin, CatalogV2Util}
-import
org.apache.spark.sql.connector.catalog.CatalogV2Implicits.{IdentifierHelper,
MultipartIdentifierHelper}
+import
org.apache.spark.sql.connector.catalog.CatalogV2Implicits.IdentifierHelper
import org.apache.spark.sql.connector.catalog.Identifier
import org.apache.spark.sql.connector.catalog.transactions.Transaction
import org.apache.spark.sql.execution.adaptive.AdaptiveSparkPlanHelper
@@ -292,14 +292,6 @@ class CacheManager extends Logging with
AdaptiveSparkPlanHelper {
case _ => false
}
- private def isSameName(
- name: Seq[String],
- catalog: CatalogPlugin,
- ident: Identifier,
- resolver: Resolver): Boolean = {
- isSameName(name, ident.toQualifiedNameParts(catalog), resolver)
- }
-
private def isSameName(
name: Seq[String],
nameInCache: Seq[String],
@@ -474,39 +466,31 @@ class CacheManager extends Logging with
AdaptiveSparkPlanHelper {
catalog: CatalogPlugin,
ident: Identifier,
tableId: Option[String],
- stateOptions: CaseInsensitiveStringMap,
- resolver: Resolver): Option[LogicalPlan] = {
- val name = ident.toQualifiedNameParts(catalog)
- val cachedRelations = findCachedRelations(name, resolver)
- // Changelog loads have their own context and state options, so they
cannot supply an
- // ordinary table's metadata even when the catalog and identifier match.
- val cachedRelation = cachedRelations.collectFirst {
- case r: DataSourceV2Relation
- if !r.table.isInstanceOf[ChangelogTable] &&
- r.catalog.contains(catalog) && r.identifier.contains(ident) &&
- tableId.forall(_ == r.table.id) &&
- CatalogV2Util.extractTableStateOptions(catalog, r.options) ==
stateOptions =>
- r
- }
- cachedRelation.foreach { _ =>
- CacheManager.logCacheOperation(
- log"Relation cache hit for table ${MDC(TABLE_NAME, name.quoted)}")
+ stateOptions: CaseInsensitiveStringMap): Option[LogicalPlan] = {
+ val cachedRelation = findCachedRelation(catalog, ident, tableId,
stateOptions)
+ cachedRelation.foreach { r =>
+ CacheManager.logCacheOperation(log"Relation cache hit for table
${MDC(TABLE_NAME, r.name)}")
}
cachedRelation
}
- private def findCachedRelations(
- name: Seq[String],
- resolver: Resolver): Seq[LogicalPlan] = {
- cachedData.flatMap { cd =>
- val plan = stripRootSubqueryAliases(cd.plan)
- plan match {
- case r @ ExtractV2CatalogAndIdentifier(catalog, ident)
- if isSameName(name, catalog, ident, resolver) &&
r.timeTravelSpec.isEmpty =>
- Some(r)
- case _ =>
- None
- }
+ // finds a relation cached directly (e.g. CACHE TABLE t) for the given table
and state,
+ // ignoring time travel relations and tables marked ineligible for the
relation cache
+ private def findCachedRelation(
+ catalog: CatalogPlugin,
+ ident: Identifier,
+ tableId: Option[String],
+ stateOptions: CaseInsensitiveStringMap): Option[DataSourceV2Relation] = {
+ val cachedPlans = cachedData.map(cd => stripRootSubqueryAliases(cd.plan))
+ cachedPlans.collectFirst {
+ case r: DataSourceV2Relation
+ if !r.table.isInstanceOf[RelationCacheIneligible] &&
+ r.catalog.contains(catalog) &&
+ r.identifier.contains(ident) &&
+ r.timeTravelSpec.isEmpty &&
+ tableId.forall(_ == r.table.id) &&
+ CatalogV2Util.extractTableStateOptions(catalog, r.options) ==
stateOptions =>
+ r
}
}
diff --git
a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2TableRefreshUtil.scala
b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2TableRefreshUtil.scala
index d52c77602dbb..5c7876dfd852 100644
---
a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2TableRefreshUtil.scala
+++
b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2TableRefreshUtil.scala
@@ -20,7 +20,6 @@ package org.apache.spark.sql.execution.datasources.v2
import scala.collection.mutable
import org.apache.spark.internal.Logging
-import org.apache.spark.sql.catalyst.SQLConfHelper
import org.apache.spark.sql.catalyst.analysis.ChangelogCacheKey
import org.apache.spark.sql.catalyst.plans.logical.{Command, LogicalPlan}
import org.apache.spark.sql.classic.SparkSession
@@ -32,7 +31,7 @@ import org.apache.spark.sql.util.SchemaValidationMode
import org.apache.spark.sql.util.SchemaValidationMode.ALLOW_NEW_FIELDS
import org.apache.spark.sql.util.SchemaValidationMode.PROHIBIT_CHANGES
-private[sql] object V2TableRefreshUtil extends SQLConfHelper with Logging {
+private[sql] object V2TableRefreshUtil extends Logging {
private type CurrentTableKey = (TableCatalog, Identifier,
CaseInsensitiveStringMap)
/**
@@ -133,7 +132,7 @@ private[sql] object V2TableRefreshUtil extends
SQLConfHelper with Logging {
table: Table,
stateOptions: CaseInsensitiveStringMap): Option[DataSourceV2Relation] = {
CatalogV2Util.lookupCachedRelationWithStateOptions(
- spark.sharedState.relationCache, catalog, ident, table, stateOptions,
conf)
+ spark.sharedState.relationCache, catalog, ident, table, stateOptions)
}
// it is not safe to allow any schema changes in commands (e.g. CTAS, RTAS,
MERGE)
diff --git
a/sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala
b/sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala
index 3271f0e1f100..7d0ae1f616c5 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala
@@ -101,8 +101,8 @@ private[sql] class SharedState(
* A relation cache backed by the cache manager.
*/
private[sql] val relationCache: RelationCache = {
- (catalog, ident, tableId, stateOptions, resolver) =>
- cacheManager.lookupCachedTable(catalog, ident, tableId, stateOptions,
resolver)
+ (catalog, ident, tableId, stateOptions) =>
+ cacheManager.lookupCachedTable(catalog, ident, tableId, stateOptions)
}
/** A global lock for all streaming query lifecycle tracking and management.
*/
diff --git
a/sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala
b/sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala
index e228bd9ea67e..f19a7251fd63 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala
@@ -2013,8 +2013,7 @@ class CachedTableSuite extends SharedSparkSession
catalog("testcat"),
Identifier.of(Array(), "tbl"),
tableId = None,
- CaseInsensitiveStringMap.empty(),
- spark.sessionState.conf.resolver).isEmpty)
+ CaseInsensitiveStringMap.empty()).isEmpty)
assert(cacheManager.numCachedEntries == 1)
assert(CopyCountingNode.numCopies.get() == 0)
@@ -2043,8 +2042,7 @@ class CachedTableSuite extends SharedSparkSession
catalog("testcat"),
Identifier.of(Array(), "tbl"),
tableId = None,
- CaseInsensitiveStringMap.empty(),
- spark.sessionState.conf.resolver).isDefined)
+ CaseInsensitiveStringMap.empty()).isDefined)
cacheManager.uncacheTableOrView(spark, Seq("testcat", "tbl"), cascade =
false)
assert(cacheManager.lookupCachedData(df).isEmpty)
diff --git
a/sql/core/src/test/scala/org/apache/spark/sql/connector/ChangelogResolutionSuite.scala
b/sql/core/src/test/scala/org/apache/spark/sql/connector/ChangelogResolutionSuite.scala
index b615857b80f9..561a14b632b1 100644
---
a/sql/core/src/test/scala/org/apache/spark/sql/connector/ChangelogResolutionSuite.scala
+++
b/sql/core/src/test/scala/org/apache/spark/sql/connector/ChangelogResolutionSuite.scala
@@ -280,6 +280,13 @@ class ChangelogResolutionSuite extends SharedSparkSession {
id, UTF8String.fromString(s"data-$id"),
UTF8String.fromString(Changelog.CHANGE_TYPE_INSERT),
version, version * 1000000L)
+ private def lookupSharedRelationCache(
+ catalog: CatalogPlugin,
+ ident: Identifier): Option[LogicalPlan] = {
+ spark.sharedState.relationCache.lookup(
+ catalog, ident, tableId = None, CaseInsensitiveStringMap.empty())
+ }
+
test("CDC metadata loads are shared across scan options but isolate contexts
and state values") {
val cat = cdcCatalog
cat.addChangeRows(ident, Seq(changeRow(1L, 1L), changeRow(2L, 2L)))
@@ -370,6 +377,71 @@ class ChangelogResolutionSuite extends SharedSparkSession {
}
}
+ test("shared relation cache does not offer a cached CHANGES relation to
table reads") {
+ val tableName = s"$cdcCatalogName.test_table"
+ sql(s"INSERT INTO $tableName VALUES (100, 'current')")
+ val cat = cdcCatalog
+ cat.addChangeRows(ident, Seq(changeRow(1L, 1L)))
+ val cacheManager = spark.sharedState.cacheManager
+ try {
+ // cache changelog
+ val changes = spark.read.option("startingVersion",
"1").changes(tableName)
+ changes.cache()
+ checkAnswer(changes.select("id"), Seq(Row(1L)))
+ assert(cacheManager.lookupCachedData(changes).isDefined)
+ assert(cacheManager.numCachedEntries == 1)
+
+ // ensure cached changelog doesn't impact shared relation cache
+ assert(lookupSharedRelationCache(cat, ident).isEmpty)
+
+ // ensure cached changelog doesn't impact table state
+ sql(s"INSERT INTO $tableName VALUES (101, 'next')")
+ val df = spark.table(tableName)
+ assert(cacheManager.lookupCachedData(df).isEmpty)
+ checkAnswer(df.select("id"), Seq(Row(100L), Row(101L)))
+ } finally {
+ spark.catalog.clearCache()
+ }
+ }
+
+ test("shared relation cache offers the cached table when its CHANGES are
cached too") {
+ val tableName = s"$cdcCatalogName.test_table"
+ sql(s"INSERT INTO $tableName VALUES (100, 'current')")
+ val cat = cdcCatalog
+ cat.addChangeRows(ident, Seq(changeRow(1L, 1L)))
+ val cacheManager = spark.sharedState.cacheManager
+ try {
+ // cache table
+ spark.table(tableName).cache()
+ assert(cacheManager.numCachedEntries == 1)
+
+ // ensure shared relation cache is populated correctly
+ assert(lookupSharedRelationCache(cat, ident).isDefined)
+
+ // cache changelog
+ val changes = spark.read.option("startingVersion",
"1").changes(tableName)
+ changes.cache()
+ checkAnswer(changes.select("id"), Seq(Row(1L)))
+ assert(cacheManager.lookupCachedData(changes).isDefined)
+ assert(cacheManager.numCachedEntries == 2)
+
+ // ensure cached changelog doesn't invalidate shared relation cache
+ assert(lookupSharedRelationCache(cat, ident).exists {
+ case r: DataSourceV2Relation => !r.table.isInstanceOf[ChangelogTable]
+ case _ => false
+ })
+ checkAnswer(spark.table(tableName).select("id"), Seq(Row(100L)))
+
+ // ensure cached changelog doesn't impact table state
+ sql(s"INSERT INTO $tableName VALUES (101, 'next')")
+ val df = spark.table(tableName)
+ assert(cacheManager.lookupCachedData(df).isDefined)
+ checkAnswer(df.select("id"), Seq(Row(100L), Row(101L)))
+ } finally {
+ spark.catalog.clearCache()
+ }
+ }
+
test("bounded CDC reads do not load the latest ordinary table") {
val cat = cdcCatalog
cat.addChangeRows(ident, Seq(changeRow(1L, 1L), changeRow(10L, 10L),
changeRow(100L, 100L)))
diff --git
a/sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2OptionSuite.scala
b/sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2OptionSuite.scala
index 75d6db68d009..47ae022b13c2 100644
---
a/sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2OptionSuite.scala
+++
b/sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2OptionSuite.scala
@@ -1640,7 +1640,7 @@ class DataSourceV2OptionSuite extends DatasourceV2SQLBase
{
java.util.Map.of("snapshot", "s1", "split-size", "9"))))
val writeRef = V2Reference.createForWriteTarget(original)
var sharedRelationCacheLookups = 0
- val sharedRelationCache: RelationCache = (_, _, _, _, _) => {
+ val sharedRelationCache: RelationCache = (_, _, _, _) => {
sharedRelationCacheLookups += 1
None
}
@@ -1716,7 +1716,7 @@ class DataSourceV2OptionSuite extends DatasourceV2SQLBase
{
java.util.Map.of("snapshot", "s1", "split-size", "9"))),
Seq("state_view"))
var sharedRelationCacheLookups = 0
- val sharedRelationCache: RelationCache = (_, _, _, _, _) => {
+ val sharedRelationCache: RelationCache = (_, _, _, _) => {
sharedRelationCacheLookups += 1
Some(cached)
}
diff --git
a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/PlanResolutionSuite.scala
b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/PlanResolutionSuite.scala
index ab0b073322a9..136ee1f2f704 100644
---
a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/PlanResolutionSuite.scala
+++
b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/PlanResolutionSuite.scala
@@ -3511,7 +3511,7 @@ class PlanResolutionSuite extends SharedSparkSession with
AnalysisTest {
val ident = Identifier.of(Array.empty[String], "tab")
val cachedRelation = DataSourceV2Relation.create(table, Some(testCat),
Some(ident))
var sharedRelationCacheLookups = 0
- val sharedRelationCache: RelationCache = (_, _, _, _, _) => {
+ val sharedRelationCache: RelationCache = (_, _, _, _) => {
sharedRelationCacheLookups += 1
Some(cachedRelation)
}
@@ -3549,7 +3549,7 @@ class PlanResolutionSuite extends SharedSparkSession with
AnalysisTest {
readOpts: java.util.Map[String, String]): DataSourceV2Relation = {
AnalysisContext.withNewAnalysisContext {
val sharedRelationCache: RelationCache =
- (_, _, _, _, _) => Some(cachedRelationWith(cacheOpts))
+ (_, _, _, _) => Some(cachedRelationWith(cacheOpts))
val rule = new RelationResolution(catalogManagerWithDefault,
sharedRelationCache)
val unresolved =
UnresolvedRelation(Seq("testcat", "tab"), new
CaseInsensitiveStringMap(readOpts))
@@ -3633,7 +3633,7 @@ class PlanResolutionSuite extends SharedSparkSession with
AnalysisTest {
sharedRelationCacheEntry(catalog, ident, currentTable, cachedTable)
var sharedRelationCacheLookups = 0
val sharedRelationCache: RelationCache =
- (_, _, _, _, _) => {
+ (_, _, _, _) => {
sharedRelationCacheLookups += 1
sharedRelationCacheCandidate
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]