diff --git a/spark-unified/src/main/java/org/apache/spark/sql/delta/catalog/DeltaCatalog.java b/spark-unified/src/main/java/org/apache/spark/sql/delta/catalog/DeltaCatalog.java
index ae4c2626d85..2dd39f36b47 100644
--- a/spark-unified/src/main/java/org/apache/spark/sql/delta/catalog/DeltaCatalog.java
+++ b/spark-unified/src/main/java/org/apache/spark/sql/delta/catalog/DeltaCatalog.java
@@ -16,7 +16,7 @@
package org.apache.spark.sql.delta.catalog;
-import io.delta.spark.internal.v2.catalog.SparkTable;
+import io.delta.spark.internal.v2.catalog.DeltaV2Table;
import org.apache.spark.sql.delta.DeltaV2Mode;
import java.util.HashMap;
import java.util.function.Supplier;
@@ -57,7 +57,7 @@
*
The unified module can access both implementations:
*
* - V1 connector: {@link DeltaTableV2} - Legacy connector using DeltaLog, full read/write support
- * - V2 connector: {@link SparkTable} - sparkV2 connector, read-only support
+ * - V2 connector: {@link DeltaV2Table} - sparkV2 connector, read-only support
*
*
* See {@link DeltaV2Mode} for V1 vs V2 connector definitions and enable mode configuration.
@@ -69,18 +69,18 @@ public class DeltaCatalog extends AbstractDeltaCatalog {
*
* Routing logic based on {@link DeltaV2Mode}:
*
- * - STRICT: Returns sparkV2 {@link SparkTable} (V2 connector)
+ * - STRICT: Returns sparkV2 {@link DeltaV2Table} (V2 connector)
* - NONE (default): Returns {@link DeltaTableV2} (V1 connector)
*
*
* @param ident The identifier of the table in the catalog.
* @param catalogTable The catalog table metadata containing table properties and location.
- * @return Table instance (SparkTable for V2, DeltaTableV2 for V1).
+ * @return Table instance (DeltaV2Table for V2, DeltaTableV2 for V1).
*/
@Override
public Table loadCatalogTable(Identifier ident, CatalogTable catalogTable) {
return loadTableInternal(
- () -> new SparkTable(ident, catalogTable, new HashMap<>()),
+ () -> new DeltaV2Table(ident, catalogTable, new HashMap<>()),
() -> super.loadCatalogTable(ident, catalogTable));
}
@@ -90,18 +90,18 @@ public Table loadCatalogTable(Identifier ident, CatalogTable catalogTable) {
*
* Routing logic based on {@link DeltaV2Mode}:
*
- * - STRICT: Returns sparkV2 {@link SparkTable} (V2 connector)
+ * - STRICT: Returns sparkV2 {@link DeltaV2Table} (V2 connector)
* - NONE (default): Returns {@link DeltaTableV2} (V1 connector)
*
*
* @param ident The identifier whose name contains the path to the Delta table.
- * @return Table instance (SparkTable for V2, DeltaTableV2 for V1).
+ * @return Table instance (DeltaV2Table for V2, DeltaTableV2 for V1).
*/
@Override
public Table loadPathTable(Identifier ident) {
return loadTableInternal(
// delta.`/path/to/table`, where ident.name() is `/path/to/table`
- () -> new SparkTable(ident, ident.name()),
+ () -> new DeltaV2Table(ident, ident.name()),
() -> super.loadPathTable(ident));
}
@@ -110,13 +110,14 @@ public Table loadPathTable(Identifier ident) {
*
* This method checks the configuration and delegates to the appropriate supplier:
*
- * - STRICT mode: Uses V2 connector (sparkV2 SparkTable) - for testing V2 capabilities
+ * - STRICT mode: Uses V2 connector (sparkV2 DeltaV2Table) - for testing V2 capabilities
* - NONE mode (default): Uses V1 connector (DeltaTableV2) - production default with full features
*
*
* See {@link DeltaV2Mode} for detailed V1 vs V2 connector definitions.
*
- * @param v2ConnectorSupplier Supplier for V2 connector (sparkV2 SparkTable) - used in STRICT mode
+ * @param v2ConnectorSupplier Supplier for V2 connector (sparkV2 DeltaV2Table)
+ * - used in STRICT mode
* @param v1ConnectorSupplier Supplier for V1 connector (DeltaTableV2) - used in NONE mode (default)
* @return Table instance from the selected supplier
*/
diff --git a/spark-unified/src/main/scala/io/delta/internal/ApplyV2Streaming.scala b/spark-unified/src/main/scala/io/delta/internal/ApplyV2Streaming.scala
index 3e6ff63f7e3..67bd83c0dac 100644
--- a/spark-unified/src/main/scala/io/delta/internal/ApplyV2Streaming.scala
+++ b/spark-unified/src/main/scala/io/delta/internal/ApplyV2Streaming.scala
@@ -19,7 +19,7 @@ package io.delta.internal
import scala.jdk.CollectionConverters._
import scala.jdk.OptionConverters._
-import io.delta.spark.internal.v2.catalog.SparkTable
+import io.delta.spark.internal.v2.catalog.DeltaV2Table
import io.delta.spark.internal.v2.utils.ScalaUtils
import org.apache.spark.sql.delta.DeltaV2Mode
import org.apache.spark.sql.delta.sources.DeltaSourceUtils
@@ -35,12 +35,12 @@ import org.apache.spark.sql.util.CaseInsensitiveStringMap
/**
* Rule for applying the V2 streaming path by rewriting V1 StreamingRelation
- * with Delta DataSource to StreamingRelationV2 with SparkTable.
+ * with Delta DataSource to StreamingRelationV2 with DeltaV2Table.
*
* This rule handles the case where Spark's FindDataSourceTable rule has converted
* a StreamingRelationV2 (with DeltaTableV2) back to a StreamingRelation because
* DeltaTableV2 doesn't advertise STREAMING_READ capability. We convert it back to
- * StreamingRelationV2 with SparkTable (from sparkV2) which does support streaming.
+ * StreamingRelationV2 with DeltaV2Table (from sparkV2) which does support streaming.
*
* See [[DeltaV2Mode]] for configuration behavior.
*
@@ -79,11 +79,11 @@ class ApplyV2Streaming(
val ident =
Identifier.of(catalogTable.identifier.database.toArray, catalogTable.identifier.table)
val table =
- new SparkTable(
+ new DeltaV2Table(
ident,
catalogTable,
// Use user-specified streaming options to override catalog storage properties.
- // SparkTable handles merging catalogTable storage props internally.
+ // DeltaV2Table handles merging catalogTable storage props internally.
ScalaUtils.toJavaMap(s.dataSource.options))
val catalog = catalogTable.identifier.catalog.map(
session.sessionState.catalogManager.catalog)
diff --git a/spark-unified/src/main/scala/io/delta/sql/DeltaSparkSessionExtension.scala b/spark-unified/src/main/scala/io/delta/sql/DeltaSparkSessionExtension.scala
index af1e06c87f9..f749135b7dd 100644
--- a/spark-unified/src/main/scala/io/delta/sql/DeltaSparkSessionExtension.scala
+++ b/spark-unified/src/main/scala/io/delta/sql/DeltaSparkSessionExtension.scala
@@ -76,7 +76,7 @@ class DeltaSparkSessionExtension extends AbstractDeltaSparkSessionExtension {
super.apply(extensions)
// Register a post-hoc resolution rule that rewrites V1 StreamingRelation plans that
- // read catalog owned Delta tables into V2 StreamingRelationV2 plans backed by SparkTable.
+ // read catalog owned Delta tables into V2 StreamingRelationV2 plans backed by DeltaV2Table.
//
// NOTE: This rule is functional (not a placeholder). Binary compatibility concerns are
// handled separately via the nested NoOpRule class below (kept for MiMa).
diff --git a/spark-unified/src/test/scala/io/delta/internal/ApplyV2StreamingSuite.scala b/spark-unified/src/test/scala/io/delta/internal/ApplyV2StreamingSuite.scala
index 9a8aab8cc7e..72b4a61c248 100644
--- a/spark-unified/src/test/scala/io/delta/internal/ApplyV2StreamingSuite.scala
+++ b/spark-unified/src/test/scala/io/delta/internal/ApplyV2StreamingSuite.scala
@@ -21,7 +21,7 @@ import java.util.{HashMap => JHashMap}
import scala.jdk.CollectionConverters._
-import io.delta.spark.internal.v2.catalog.SparkTable
+import io.delta.spark.internal.v2.catalog.DeltaV2Table
import io.delta.storage.commit.uccommitcoordinator.UCCommitCoordinatorClient
import org.apache.spark.sql.catalyst.TableIdentifier
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
@@ -45,7 +45,7 @@ class ApplyV2StreamingSuite extends DeltaSQLCommandTest {
private def assertV2(result: LogicalPlan): Unit = {
result match {
- case StreamingRelationV2(_, _, _: SparkTable, _, _, _, _, v1Relation) =>
+ case StreamingRelationV2(_, _, _: DeltaV2Table, _, _, _, _, v1Relation) =>
assert(v1Relation.isEmpty)
case other =>
fail(s"Expected StreamingRelationV2, got $other")
@@ -100,7 +100,7 @@ class ApplyV2StreamingSuite extends DeltaSQLCommandTest {
val ident = Identifier.of(
catalogTable.identifier.database.toArray,
catalogTable.identifier.table)
- val table = new SparkTable(ident, catalogTable, new JHashMap[String, String]())
+ val table = new DeltaV2Table(ident, catalogTable, new JHashMap[String, String]())
DataSourceV2Relation.create(
table,
None,
diff --git a/spark-unified/src/test/scala/org/apache/spark/sql/delta/DataFrameWriterV2WithV2ConnectorSuite.scala b/spark-unified/src/test/scala/org/apache/spark/sql/delta/DataFrameWriterV2WithV2ConnectorSuite.scala
index 93f8709073a..82bf026054f 100644
--- a/spark-unified/src/test/scala/org/apache/spark/sql/delta/DataFrameWriterV2WithV2ConnectorSuite.scala
+++ b/spark-unified/src/test/scala/org/apache/spark/sql/delta/DataFrameWriterV2WithV2ConnectorSuite.scala
@@ -30,7 +30,7 @@ class DataFrameWriterV2WithV2ConnectorSuite
* Tests that we expect to fail because they require write operations after initial
* table creation.
*
- * Kernel's SparkTable (V2 connector) only implements SupportsRead, not SupportsWrite.
+ * Kernel's DeltaV2Table (V2 connector) only implements SupportsRead, not SupportsWrite.
* Tests that perform append/replace operations after table creation are expected to fail.
*/
override protected def shouldFail(testName: String): Boolean = {
@@ -49,8 +49,8 @@ class DataFrameWriterV2WithV2ConnectorSuite
"OverwritePartitions: overwrite all rows if not partitioned",
"OverwritePartitions: by name not position",
- // Create operations - TODO: fix SparkTable's name() to match DeltaTableV2
- // SparkTable.name() returns simple table name, but tests expect catalog.schema.table format
+ // Create operations - TODO: fix DeltaV2Table's name() to match DeltaTableV2
+ // DeltaV2Table.name() returns simple table name, but tests expect catalog.schema.table format
"Create: basic behavior",
"Create: with using",
"Create: with property",
diff --git a/spark-unified/src/test/scala/org/apache/spark/sql/delta/catalog/DeltaCatalogSuite.scala b/spark-unified/src/test/scala/org/apache/spark/sql/delta/catalog/DeltaCatalogSuite.scala
index 067905bd3b8..5080efbceae 100644
--- a/spark-unified/src/test/scala/org/apache/spark/sql/delta/catalog/DeltaCatalogSuite.scala
+++ b/spark-unified/src/test/scala/org/apache/spark/sql/delta/catalog/DeltaCatalogSuite.scala
@@ -16,7 +16,7 @@
package org.apache.spark.sql.delta.catalog
-import io.delta.spark.internal.v2.catalog.SparkTable
+import io.delta.spark.internal.v2.catalog.DeltaV2Table
import org.apache.spark.sql.delta.sources.DeltaSQLConf
import org.apache.spark.sql.delta.test.DeltaSQLCommandTest
@@ -28,13 +28,13 @@ import java.util.Locale
*
* Verifies that DeltaCatalog correctly routes table loading based on
* DeltaSQLConf.V2_ENABLE_MODE:
- * - STRICT mode: Kernel's SparkTable (V2 connector)
+ * - STRICT mode: Kernel's DeltaV2Table (V2 connector)
* - NONE mode (default): DeltaTableV2 (V1 connector)
*/
class DeltaCatalogSuite extends DeltaSQLCommandTest {
private val modeTestCases = Seq(
- ("STRICT", classOf[SparkTable], "Kernel SparkTable"),
+ ("STRICT", classOf[DeltaV2Table], "Kernel DeltaV2Table"),
("NONE", classOf[DeltaTableV2], "DeltaTableV2")
)
diff --git a/spark-unified/src/test/scala/org/apache/spark/sql/delta/test/V2ForceTest.scala b/spark-unified/src/test/scala/org/apache/spark/sql/delta/test/V2ForceTest.scala
index 693fec8534b..7fa98cd122a 100644
--- a/spark-unified/src/test/scala/org/apache/spark/sql/delta/test/V2ForceTest.scala
+++ b/spark-unified/src/test/scala/org/apache/spark/sql/delta/test/V2ForceTest.scala
@@ -25,7 +25,7 @@ import scala.collection.mutable
/**
* Trait that forces Delta V2 connector mode to STRICT, ensuring all operations
- * use the Kernel-based SparkTable implementation (V2 connector) instead of
+ * use the Kernel-based DeltaV2Table implementation (V2 connector) instead of
* DeltaTableV2 (V1 connector).
*
* See [[DeltaSQLConf.V2_ENABLE_MODE]] for V1 vs V2 connector definitions.
@@ -85,7 +85,7 @@ trait V2ForceTest extends DeltaSQLCommandTest {
/**
* Override `sparkConf` to set V2_ENABLE_MODE to "STRICT".
- * This ensures all catalog operations use Kernel SparkTable (V2 connector).
+ * This ensures all catalog operations use Kernel DeltaV2Table (V2 connector).
*/
abstract override protected def sparkConf: SparkConf = {
super.sparkConf
@@ -94,7 +94,7 @@ trait V2ForceTest extends DeltaSQLCommandTest {
/**
* Run a SQL statement through the V1 connector by temporarily setting
- * V2_ENABLE_MODE to NONE. Useful for DDL/DML that SparkTable (V2) doesn't support.
+ * V2_ENABLE_MODE to NONE. Useful for DDL/DML that DeltaV2Table (V2) doesn't support.
*/
protected def executeInV1Mode(sqlText: String): Unit = {
withSQLConf(DeltaSQLConf.V2_ENABLE_MODE.key -> "NONE") {
diff --git a/spark-unified/src/test/scala/org/apache/spark/sql/delta/test/columnmapping/RemoveColumnMappingStreamingReadV2Suite.scala b/spark-unified/src/test/scala/org/apache/spark/sql/delta/test/columnmapping/RemoveColumnMappingStreamingReadV2Suite.scala
index 44cb20e4065..1e6f965cd55 100644
--- a/spark-unified/src/test/scala/org/apache/spark/sql/delta/test/columnmapping/RemoveColumnMappingStreamingReadV2Suite.scala
+++ b/spark-unified/src/test/scala/org/apache/spark/sql/delta/test/columnmapping/RemoveColumnMappingStreamingReadV2Suite.scala
@@ -23,7 +23,7 @@ import org.apache.spark.sql.delta.test.V2ForceTest
* Test suite that runs [[RemoveColumnMappingStreamingReadSuite]] using the V2 connector
* (V2_ENABLE_MODE=STRICT).
*
- * SparkTable (V2) is read-only and does not support DDL, so DDL/DML operations are routed
+ * DeltaV2Table (V2) is read-only and does not support DDL, so DDL/DML operations are routed
* through the V1 connector via `executeDml`. Only streaming reads use the V2 connector.
*/
class RemoveColumnMappingStreamingReadV2Suite
diff --git a/spark/src/main/java/org/apache/spark/sql/delta/DeltaV2Mode.java b/spark/src/main/java/org/apache/spark/sql/delta/DeltaV2Mode.java
index 54dd589b33b..f7b38e81ec4 100644
--- a/spark/src/main/java/org/apache/spark/sql/delta/DeltaV2Mode.java
+++ b/spark/src/main/java/org/apache/spark/sql/delta/DeltaV2Mode.java
@@ -73,7 +73,7 @@ public boolean isStreamingReadsEnabled(Optional catalogTable) {
}
/**
- * Determines if catalog should return sparkV2 (SparkTable) or sparkV1 (DeltaTableV2) tables.
+ * Determines if catalog should return sparkV2 (DeltaV2Table) or sparkV1 (DeltaTableV2) tables.
*
* @return true if catalog should return sparkV2 tables
*/
diff --git a/spark/src/main/scala-shims/spark-4.0/SparkTableShims.scala b/spark/src/main/scala-shims/spark-4.0/SparkTableShims.scala
index 234020cd6ef..d44f141607f 100644
--- a/spark/src/main/scala-shims/spark-4.0/SparkTableShims.scala
+++ b/spark/src/main/scala-shims/spark-4.0/SparkTableShims.scala
@@ -18,7 +18,7 @@ package org.apache.spark.sql.delta
import org.apache.spark.sql.connector.catalog.TableCapability
-/** Shim to build [[SparkTable]] against different Spark versions. */
+/** Shim to build [[DeltaV2Table]] against different Spark versions. */
object SparkTableShims {
// Capability [[TableCapability.AUTOMATIC_SCHEMA_EVOLUTION]] is not available in Spark 4.0.
val schemaEvolutionCapability: Option[TableCapability] = None
diff --git a/spark/src/main/scala-shims/spark-4.1/SparkTableShims.scala b/spark/src/main/scala-shims/spark-4.1/SparkTableShims.scala
index f9e32083aa1..89a03a655da 100644
--- a/spark/src/main/scala-shims/spark-4.1/SparkTableShims.scala
+++ b/spark/src/main/scala-shims/spark-4.1/SparkTableShims.scala
@@ -18,7 +18,7 @@ package org.apache.spark.sql.delta
import org.apache.spark.sql.connector.catalog.TableCapability
-/** Shim to build [[SparkTable]] against different Spark versions. */
+/** Shim to build [[DeltaV2Table]] against different Spark versions. */
object SparkTableShims {
// Capability [[TableCapability.AUTOMATIC_SCHEMA_EVOLUTION]] is available in Spark 4.1, but
// schema evolution isn't properly supported yet in MERGE/INSERT there so ignore it.
diff --git a/spark/src/main/scala-shims/spark-4.2/SparkTableShims.scala b/spark/src/main/scala-shims/spark-4.2/SparkTableShims.scala
index d0b76568999..d797e752b5c 100644
--- a/spark/src/main/scala-shims/spark-4.2/SparkTableShims.scala
+++ b/spark/src/main/scala-shims/spark-4.2/SparkTableShims.scala
@@ -19,7 +19,7 @@ package org.apache.spark.sql.delta
import org.apache.spark.sql.connector.catalog.TableCapability
/**
- * Shim to build [[SparkTable]] against different Spark versions.
+ * Shim to build [[DeltaV2Table]] against different Spark versions.
* This is the shim for the latest version - Spark 4.2.
*/
object SparkTableShims {
diff --git a/spark/src/main/scala/org/apache/spark/sql/delta/sources/DeltaSQLConf.scala b/spark/src/main/scala/org/apache/spark/sql/delta/sources/DeltaSQLConf.scala
index 5a72ecc105a..212d1f0e2a2 100644
--- a/spark/src/main/scala/org/apache/spark/sql/delta/sources/DeltaSQLConf.scala
+++ b/spark/src/main/scala/org/apache/spark/sql/delta/sources/DeltaSQLConf.scala
@@ -3354,15 +3354,15 @@ trait DeltaSQLConfBase extends DeltaSQLConfUtils {
*
* Valid values:
* - NONE: sparkV2 connector is disabled, always use sparkV1 connector (DeltaTableV2) - default
- * - AUTO: Automatically use sparkV2 connector (SparkTable) for Unity Catalog managed tables
+ * - AUTO: Automatically use sparkV2 connector (DeltaV2Table) for Unity Catalog managed tables
* in streaming queries and sparkV1 connector (DeltaTableV2) for all other tables
- * - STRICT: sparkV2 connector is strictly enforced, always use sparkV2 connector (SparkTable).
+ * - STRICT: sparkV2 connector is strictly enforced, always use sparkV2 connector (DeltaV2Table).
* Intended for testing sparkV2 connector capabilities
*
* sparkV1 vs sparkV2 Connectors:
* - sparkV1 Connector (DeltaTableV2): Legacy Delta connector with full read/write support,
* uses DeltaLog for metadata management
- * - sparkV2 Connector (SparkTable): New kernel-based connector with read-only support,
+ * - sparkV2 Connector (DeltaV2Table): New kernel-based connector with read-only support,
* uses Kernel's Table API for metadata management
*
* See [[org.apache.spark.sql.delta.DeltaV2Mode]] for the centralized logic that interprets
diff --git a/spark/src/test/scala/org/apache/spark/sql/delta/DeltaSourceDeletionVectorsSuite.scala b/spark/src/test/scala/org/apache/spark/sql/delta/DeltaSourceDeletionVectorsSuite.scala
index 0c15d0aa001..3b68651affa 100644
--- a/spark/src/test/scala/org/apache/spark/sql/delta/DeltaSourceDeletionVectorsSuite.scala
+++ b/spark/src/test/scala/org/apache/spark/sql/delta/DeltaSourceDeletionVectorsSuite.scala
@@ -38,7 +38,7 @@ trait DeltaSourceDeletionVectorTests extends StreamTest
/**
* Executes a DML SQL statement (DELETE, INSERT, etc.).
* Overridable so that V2 suites can route DML through the V1 connector,
- * since SparkTable (V2) is read-only and does not support writes.
+ * since DeltaV2Table (V2) is read-only and does not support writes.
*/
protected def executeDml(sqlText: String): Unit = sql(sqlText)
diff --git a/spark/src/test/scala/org/apache/spark/sql/delta/DeltaSourceSchemaEvolutionSuite.scala b/spark/src/test/scala/org/apache/spark/sql/delta/DeltaSourceSchemaEvolutionSuite.scala
index 4b5a70bbcd4..a70169eaeb8 100644
--- a/spark/src/test/scala/org/apache/spark/sql/delta/DeltaSourceSchemaEvolutionSuite.scala
+++ b/spark/src/test/scala/org/apache/spark/sql/delta/DeltaSourceSchemaEvolutionSuite.scala
@@ -235,7 +235,7 @@ trait StreamingSchemaEvolutionSuiteBase extends ColumnMappingStreamingTestUtils
/**
* Executes a DDL/DML SQL statement. Overridable so that V2 suites can route it through the V1
- * connector, since SparkTable (V2) is read-only and does not support writes/DDL.
+ * connector, since DeltaV2Table (V2) is read-only and does not support writes/DDL.
*/
protected def executeDml(sqlText: String): Unit = sql(sqlText)
diff --git a/spark/src/test/scala/org/apache/spark/sql/delta/catalog/InMemorySparkTable.scala b/spark/src/test/scala/org/apache/spark/sql/delta/catalog/InMemorySparkTable.scala
index 5654f8c8572..805c4a0defd 100644
--- a/spark/src/test/scala/org/apache/spark/sql/delta/catalog/InMemorySparkTable.scala
+++ b/spark/src/test/scala/org/apache/spark/sql/delta/catalog/InMemorySparkTable.scala
@@ -26,7 +26,7 @@ import org.apache.spark.sql.sources.Filter
import org.apache.spark.sql.types.StructType
/**
- * In-memory DSv2 table used as a test stand-in for SparkTable (the Kernel-based Delta V2
+ * In-memory DSv2 table used as a test stand-in for DeltaV2Table (the Kernel-based Delta V2
* connector).
*
* Created by [[InMemoryDeltaCatalog]] when used as the session catalog in tests.
diff --git a/spark/src/test/scala/org/apache/spark/sql/delta/typewidening/TypeWideningStreamingSourceSuite.scala b/spark/src/test/scala/org/apache/spark/sql/delta/typewidening/TypeWideningStreamingSourceSuite.scala
index cb315441164..ed6b192b410 100644
--- a/spark/src/test/scala/org/apache/spark/sql/delta/typewidening/TypeWideningStreamingSourceSuite.scala
+++ b/spark/src/test/scala/org/apache/spark/sql/delta/typewidening/TypeWideningStreamingSourceSuite.scala
@@ -116,7 +116,7 @@ trait TypeWideningStreamingSourceTestMixin
/**
* Executes a DDL/DML SQL statement. Overridable so that V2 suites can route it through the V1
- * connector, since SparkTable (V2) is read-only and does not support writes/DDL.
+ * connector, since DeltaV2Table (V2) is read-only and does not support writes/DDL.
*/
protected def executeDml(sqlText: String): Unit = sql(sqlText)
diff --git a/spark/v2/src/main/java/io/delta/spark/internal/v2/catalog/SparkTable.java b/spark/v2/src/main/java/io/delta/spark/internal/v2/catalog/DeltaV2Table.java
similarity index 95%
rename from spark/v2/src/main/java/io/delta/spark/internal/v2/catalog/SparkTable.java
rename to spark/v2/src/main/java/io/delta/spark/internal/v2/catalog/DeltaV2Table.java
index 92233d922b3..4946d67d0f5 100644
--- a/spark/v2/src/main/java/io/delta/spark/internal/v2/catalog/SparkTable.java
+++ b/spark/v2/src/main/java/io/delta/spark/internal/v2/catalog/DeltaV2Table.java
@@ -57,7 +57,7 @@
import org.apache.spark.sql.util.CaseInsensitiveStringMap;
/** DataSource V2 Table implementation for Delta Lake using the Delta Kernel API. */
-public class SparkTable implements Table, SupportsRead, SupportsWrite, SupportsMetadataColumns {
+public class DeltaV2Table implements Table, SupportsRead, SupportsWrite, SupportsMetadataColumns {
private static final String METADATA_COLUMN_NAME = FileFormat$.MODULE$.METADATA_NAME();
private static final String ROW_ID_METADATA_FIELD_NAME = RowId$.MODULE$.ROW_ID();
private static final String ROW_COMMIT_VERSION_METADATA_FIELD_NAME =
@@ -94,25 +94,25 @@ private static Set buildCapabilities() {
private final boolean isCDCRead;
/**
- * Creates a SparkTable from a filesystem path without a catalog table.
+ * Creates a DeltaV2Table from a filesystem path without a catalog table.
*
* @param identifier logical table identifier used by Spark's catalog
* @param tablePath filesystem path to the Delta table root
* @throws NullPointerException if identifier or tablePath is null
*/
- public SparkTable(Identifier identifier, String tablePath) {
+ public DeltaV2Table(Identifier identifier, String tablePath) {
this(identifier, tablePath, Collections.emptyMap(), Optional.empty());
}
/**
- * Creates a SparkTable from a filesystem path with options.
+ * Creates a DeltaV2Table from a filesystem path with options.
*
* @param identifier logical table identifier used by Spark's catalog
* @param tablePath filesystem path to the Delta table root
* @param options table options used to configure the Hadoop conf, table reads and writes
* @throws NullPointerException if identifier or tablePath is null
*/
- public SparkTable(Identifier identifier, String tablePath, Map options) {
+ public DeltaV2Table(Identifier identifier, String tablePath, Map options) {
this(identifier, tablePath, options, Optional.empty());
}
@@ -125,7 +125,8 @@ public SparkTable(Identifier identifier, String tablePath, Map o
* @param catalogTable the Spark CatalogTable containing table metadata including location
* @param options user-provided options to override catalog properties
*/
- public SparkTable(Identifier identifier, CatalogTable catalogTable, Map options) {
+ public DeltaV2Table(
+ Identifier identifier, CatalogTable catalogTable, Map options) {
this(
identifier,
getDecodedPath(requireNonNull(catalogTable, "catalogTable is null").location()),
@@ -134,7 +135,7 @@ public SparkTable(Identifier identifier, CatalogTable catalogTable, MapSide effects: - Initializes a SnapshotManager for the given tablePath. - Loads the latest
@@ -145,7 +146,7 @@ public SparkTable(Identifier identifier, CatalogTable catalogTable, Map userOptions,
@@ -202,7 +203,7 @@ private static String getDecodedPath(java.net.URI location) {
}
/**
- * Returns the CatalogTable if this SparkTable was created from a catalog table.
+ * Returns the CatalogTable if this DeltaV2Table was created from a catalog table.
*
* @return Optional containing the CatalogTable, or empty if this table was created from a path
*/
@@ -337,7 +338,7 @@ public WriteBuilder newWriteBuilder(LogicalWriteInfo info) {
@Override
public String toString() {
- return "SparkTable{identifier=" + identifier + '}';
+ return "DeltaV2Table{identifier=" + identifier + '}';
}
@Override
@@ -348,7 +349,7 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- SparkTable that = (SparkTable) o;
+ DeltaV2Table that = (DeltaV2Table) o;
return Objects.equals(identifier, that.identifier)
&& Objects.equals(tablePath, that.tablePath)
&& Objects.equals(options, that.options)
diff --git a/spark/v2/src/main/java/io/delta/spark/internal/v2/write/DeltaV2WriteBuilder.java b/spark/v2/src/main/java/io/delta/spark/internal/v2/write/DeltaV2WriteBuilder.java
index fd0aba47d5d..3ea341b0b19 100644
--- a/spark/v2/src/main/java/io/delta/spark/internal/v2/write/DeltaV2WriteBuilder.java
+++ b/spark/v2/src/main/java/io/delta/spark/internal/v2/write/DeltaV2WriteBuilder.java
@@ -46,7 +46,7 @@ public class DeltaV2WriteBuilder implements WriteBuilder {
private final LogicalWriteInfo writeInfo;
/**
- * @param engine Kernel engine (persisted in SparkTable, shared across operations)
+ * @param engine Kernel engine (persisted in DeltaV2Table, shared across operations)
* @param tablePath filesystem path to the Delta table root
* @param hadoopConf Hadoop configuration (with merged table options)
* @param initialSnapshot Kernel snapshot loaded at table construction time
diff --git a/spark/v2/src/test/java/io/delta/spark/internal/v2/catalog/SparkTableTest.java b/spark/v2/src/test/java/io/delta/spark/internal/v2/catalog/DeltaV2TableTest.java
similarity index 91%
rename from spark/v2/src/test/java/io/delta/spark/internal/v2/catalog/SparkTableTest.java
rename to spark/v2/src/test/java/io/delta/spark/internal/v2/catalog/DeltaV2TableTest.java
index e0c94307d6f..07d6d1f3ff8 100644
--- a/spark/v2/src/test/java/io/delta/spark/internal/v2/catalog/SparkTableTest.java
+++ b/spark/v2/src/test/java/io/delta/spark/internal/v2/catalog/DeltaV2TableTest.java
@@ -56,7 +56,7 @@
import org.junit.jupiter.params.provider.MethodSource;
import scala.Option;
-public class SparkTableTest extends DeltaV2TestBase {
+public class DeltaV2TableTest extends DeltaV2TestBase {
@ParameterizedTest(name = "{0} - {1}")
@MethodSource("tableTestCases")
@@ -68,18 +68,18 @@ public void testDeltaKernelTable(
testCase.createTableSql.apply(tableName, path);
Identifier identifier = Identifier.of(new String[] {"default"}, tableName);
- // Create SparkTable based on construction method
- SparkTable kernelTable;
+ // Create DeltaV2Table based on construction method
+ DeltaV2Table kernelTable;
CatalogTable catalogTable = null;
switch (method) {
case FROM_PATH:
- kernelTable = new SparkTable(identifier, path);
+ kernelTable = new DeltaV2Table(identifier, path);
break;
case FROM_CATALOG_TABLE:
catalogTable =
spark.sessionState().catalog().getTableMetadata(new TableIdentifier(tableName));
- kernelTable = new SparkTable(identifier, catalogTable, Collections.emptyMap());
+ kernelTable = new DeltaV2Table(identifier, catalogTable, Collections.emptyMap());
break;
default:
throw new IllegalArgumentException("Unknown construction method: " + method);
@@ -119,7 +119,7 @@ public void testDeltaKernelTable(
}
// ===== Verify schema consistency with DeltaTableV2 =====
- // This ensures SparkTable (Kernel-based) returns the same schema as DeltaTableV2 (V1-based)
+ // This ensures DeltaV2Table (Kernel-based) returns the same schema as DeltaTableV2 (V1-based)
// Both should properly remove internal Delta metadata (e.g., column mapping physical names)
DeltaTableV2 deltaTableV2;
switch (method) {
@@ -151,7 +151,7 @@ public void testDeltaKernelTable(
assertEquals(
deltaTableV2.schema(),
sparkSchema,
- "SparkTable schema should match DeltaTableV2 schema for test case: " + testCase.name);
+ "DeltaV2Table schema should match DeltaTableV2 schema for test case: " + testCase.name);
// ===== Test partitioning =====
Transform[] partitioning = kernelTable.partitioning();
@@ -182,12 +182,12 @@ public void testDeltaKernelTable(
case FROM_PATH:
assertFalse(
retrievedCatalogTable.isPresent(),
- "Path-based SparkTable should not have catalog table");
+ "Path-based DeltaV2Table should not have catalog table");
break;
case FROM_CATALOG_TABLE:
assertTrue(
retrievedCatalogTable.isPresent(),
- "CatalogTable-based SparkTable should have catalog table");
+ "CatalogTable-based DeltaV2Table should have catalog table");
assertEquals(
catalogTable,
retrievedCatalogTable.get(),
@@ -200,7 +200,7 @@ public void testDeltaKernelTable(
assertEquals(new Path(path), retrievedPath, "getTablePath should return Path from tablePath");
}
- /** Enum to represent different construction methods for SparkTable */
+ /** Enum to represent different construction methods for DeltaV2Table */
enum ConstructionMethod {
FROM_PATH("Path"),
FROM_CATALOG_TABLE("CatalogTable");
@@ -356,7 +356,7 @@ public void testGetDecodedPathSupportsVariousUriSchemes(String scheme, String ur
throws Exception {
// Access the private static method via reflection
Method getDecodedPath =
- SparkTable.class.getDeclaredMethod("getDecodedPath", java.net.URI.class);
+ DeltaV2Table.class.getDeclaredMethod("getDecodedPath", java.net.URI.class);
getDecodedPath.setAccessible(true);
URI uri = new URI(uriString);
@@ -374,7 +374,7 @@ public void testGetDecodedPathSupportsVariousUriSchemes(String scheme, String ur
public void testGetDecodedPathDecodesUrlEncodedCharacters() throws Exception {
// Access the private static method via reflection
Method getDecodedPath =
- SparkTable.class.getDeclaredMethod("getDecodedPath", java.net.URI.class);
+ DeltaV2Table.class.getDeclaredMethod("getDecodedPath", java.net.URI.class);
getDecodedPath.setAccessible(true);
// Test URL-encoded path: "spark%25dir%25prefix" should decode to "spark%dir%prefix"
@@ -407,9 +407,9 @@ public void testEqualsAndHashCode(@TempDir File tempDir) {
Identifier identifier = Identifier.of(new String[] {"default"}, "test_equals");
Map options = Collections.singletonMap("key", "value");
- SparkTable table1 = new SparkTable(identifier, path, options);
- SparkTable table2 = new SparkTable(identifier, path, options);
- SparkTable table3 = new SparkTable(identifier, path, Collections.emptyMap());
+ DeltaV2Table table1 = new DeltaV2Table(identifier, path, options);
+ DeltaV2Table table2 = new DeltaV2Table(identifier, path, options);
+ DeltaV2Table table3 = new DeltaV2Table(identifier, path, Collections.emptyMap());
// Same identifier, path, and options should be equal
assertEquals(table1, table2);
@@ -432,13 +432,13 @@ public void testEqualsAndHashCodeWithCatalogTable(@TempDir File tempDir) throws
Identifier identifier = Identifier.of(new String[] {"default"}, "test_catalog");
// Create table1 and table2 with separately fetched CatalogTable objects (not same instance)
- SparkTable table1 =
- new SparkTable(
+ DeltaV2Table table1 =
+ new DeltaV2Table(
identifier,
spark.sessionState().catalog().getTableMetadata(new TableIdentifier("test_catalog1")),
Collections.emptyMap());
- SparkTable table2 =
- new SparkTable(
+ DeltaV2Table table2 =
+ new DeltaV2Table(
identifier,
spark.sessionState().catalog().getTableMetadata(new TableIdentifier("test_catalog1")),
Collections.emptyMap());
@@ -448,8 +448,8 @@ public void testEqualsAndHashCodeWithCatalogTable(@TempDir File tempDir) throws
assertEquals(table1.hashCode(), table2.hashCode());
// Different catalogTable should not be equal
- SparkTable table3 =
- new SparkTable(
+ DeltaV2Table table3 =
+ new DeltaV2Table(
identifier,
spark.sessionState().catalog().getTableMetadata(new TableIdentifier("test_catalog2")),
Collections.emptyMap());
@@ -457,7 +457,7 @@ public void testEqualsAndHashCodeWithCatalogTable(@TempDir File tempDir) throws
assertNotEquals(table1.hashCode(), table3.hashCode());
// Path-based table (no catalogTable) should not equal catalog-based table
- SparkTable table4 = new SparkTable(identifier, path1, Collections.emptyMap());
+ DeltaV2Table table4 = new DeltaV2Table(identifier, path1, Collections.emptyMap());
assertNotEquals(table1, table4);
assertNotEquals(table1.hashCode(), table4.hashCode());
}
@@ -469,20 +469,20 @@ public void testEqualsAndHashCodeWithDifferentSnapshotVersions(@TempDir File tem
Identifier identifier = Identifier.of(new String[] {"default"}, "test_snapshot");
- // Create first SparkTable instance at version 0
- SparkTable table1 = new SparkTable(identifier, path);
+ // Create first DeltaV2Table instance at version 0
+ DeltaV2Table table1 = new DeltaV2Table(identifier, path);
// Modify the table to create a new version
spark.sql("INSERT INTO test_snapshot VALUES (1)");
- // Create second SparkTable instance at version 1
- SparkTable table2 = new SparkTable(identifier, path);
+ // Create second DeltaV2Table instance at version 1
+ DeltaV2Table table2 = new DeltaV2Table(identifier, path);
// Same identifier and path but different snapshot versions should not be equal
assertNotEquals(
table1,
table2,
- "SparkTable instances with different snapshot versions should not be equal");
+ "DeltaV2Table instances with different snapshot versions should not be equal");
assertNotEquals(
table1.hashCode(),
table2.hashCode(),
@@ -495,8 +495,8 @@ public void testNewWriteBuilderReturnsWriteBuilder(@TempDir File tempDir) throws
spark.sql(
String.format("CREATE TABLE test_write_builder (id INT) USING delta LOCATION '%s'", path));
- SparkTable table =
- new SparkTable(Identifier.of(new String[] {"default"}, "test_write_builder"), path);
+ DeltaV2Table table =
+ new DeltaV2Table(Identifier.of(new String[] {"default"}, "test_write_builder"), path);
LogicalWriteInfo writeInfo =
new LogicalWriteInfo() {
@Override
@@ -525,7 +525,7 @@ public void testSchemaWithReadChangeFeedIncludesCDCColumns(@TempDir File tempDir
Identifier identifier = Identifier.of(new String[] {"default"}, "test_cdc_on");
Map options = Collections.singletonMap("readChangeFeed", "true");
- SparkTable table = new SparkTable(identifier, path, options);
+ DeltaV2Table table = new DeltaV2Table(identifier, path, options);
StructType schema = table.schema();
List names = Arrays.asList(schema.fieldNames());
@@ -551,7 +551,7 @@ public void testSchemaWithoutReadChangeFeedExcludesCDCColumns(@TempDir File temp
spark.sql(String.format("CREATE TABLE test_cdc_off (id INT) USING delta LOCATION '%s'", path));
Identifier identifier = Identifier.of(new String[] {"default"}, "test_cdc_off");
- SparkTable table = new SparkTable(identifier, path, Collections.emptyMap());
+ DeltaV2Table table = new DeltaV2Table(identifier, path, Collections.emptyMap());
StructType schema = table.schema();
List names = Arrays.asList(schema.fieldNames());
diff --git a/spark/v2/src/test/java/io/delta/spark/internal/v2/catalog/TestCatalog.java b/spark/v2/src/test/java/io/delta/spark/internal/v2/catalog/TestCatalog.java
index d467e6cddb6..f6f7ddbd15a 100644
--- a/spark/v2/src/test/java/io/delta/spark/internal/v2/catalog/TestCatalog.java
+++ b/spark/v2/src/test/java/io/delta/spark/internal/v2/catalog/TestCatalog.java
@@ -79,7 +79,7 @@ public Table loadTable(Identifier ident) throws NoSuchTableException {
throw new NoSuchTableException(ident);
}
try {
- return new SparkTable(ident, tablePath);
+ return new DeltaV2Table(ident, tablePath);
} catch (Exception e) {
throw new RuntimeException("Failed to load table: " + ident, e);
}
@@ -111,8 +111,8 @@ public Table createTable(
.build(engine)
.commit(engine, CloseableIterable.emptyIterable());
- // Load the created table and return SparkTable
- return new SparkTable(ident, tablePath);
+ // Load the created table and return DeltaV2Table
+ return new DeltaV2Table(ident, tablePath);
} catch (Exception e) {
// Remove the table entry if creation fails
diff --git a/spark/v2/src/test/java/io/delta/spark/internal/v2/read/SparkBatchTest.java b/spark/v2/src/test/java/io/delta/spark/internal/v2/read/SparkBatchTest.java
index a73ce93068b..56bdbd94fc7 100644
--- a/spark/v2/src/test/java/io/delta/spark/internal/v2/read/SparkBatchTest.java
+++ b/spark/v2/src/test/java/io/delta/spark/internal/v2/read/SparkBatchTest.java
@@ -19,7 +19,7 @@
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import io.delta.spark.internal.v2.DeltaV2TestBase;
-import io.delta.spark.internal.v2.catalog.SparkTable;
+import io.delta.spark.internal.v2.catalog.DeltaV2Table;
import java.io.File;
import java.util.stream.Stream;
import org.apache.spark.sql.connector.catalog.Identifier;
@@ -49,8 +49,8 @@ public static void setupPartitionedTable(@TempDir File tempDir) {
private final CaseInsensitiveStringMap options =
new CaseInsensitiveStringMap(new java.util.HashMap<>());
- private final SparkTable table =
- new SparkTable(
+ private final DeltaV2Table table =
+ new DeltaV2Table(
Identifier.of(new String[] {"spark_catalog", "default"}, tableName), tablePath, options);
// Cases where two batches built from the same table must be equal. city/date are partition
diff --git a/spark/v2/src/test/java/io/delta/spark/internal/v2/read/SparkGoldenTableTest.java b/spark/v2/src/test/java/io/delta/spark/internal/v2/read/SparkGoldenTableTest.java
index 48f4fc5886e..031d9b130c0 100644
--- a/spark/v2/src/test/java/io/delta/spark/internal/v2/read/SparkGoldenTableTest.java
+++ b/spark/v2/src/test/java/io/delta/spark/internal/v2/read/SparkGoldenTableTest.java
@@ -22,7 +22,7 @@
import io.delta.kernel.expressions.Column;
import io.delta.kernel.expressions.Literal;
import io.delta.kernel.expressions.Predicate;
-import io.delta.spark.internal.v2.catalog.SparkTable;
+import io.delta.spark.internal.v2.catalog.DeltaV2Table;
import java.io.File;
import java.lang.reflect.Field;
import java.math.BigDecimal;
@@ -94,8 +94,8 @@ public void testDsv2Internal() throws Exception {
put("key2", "value2");
}
});
- SparkTable table =
- new SparkTable(
+ DeltaV2Table table =
+ new DeltaV2Table(
Identifier.of(new String[] {"spark_catalog", "default"}, tableName),
tablePath,
options);
@@ -378,7 +378,7 @@ public void testDsv2Internal() throws Exception {
}
private void checkSupportsPushDownFilters(
- SparkTable table,
+ DeltaV2Table table,
CaseInsensitiveStringMap scanOptions,
Filter[] inputFilters,
Filter[] expectedPostScanFilters,
@@ -445,8 +445,8 @@ private Optional getKernelScanBuilderPredicate(SparkScanBuilder build
public void testDsv2InteralWithNestedStruct() {
String tableName = "data-reader-nested-struct";
String tablePath = goldenTablePath(tableName);
- SparkTable table =
- new SparkTable(
+ DeltaV2Table table =
+ new DeltaV2Table(
Identifier.of(new String[] {"spark_catalog", "default"}, tableName), tablePath);
StructType expectedSchema =
diff --git a/spark/v2/src/test/java/io/delta/spark/internal/v2/read/SparkScanTest.java b/spark/v2/src/test/java/io/delta/spark/internal/v2/read/SparkScanTest.java
index f1c05478e02..465993fb5a9 100644
--- a/spark/v2/src/test/java/io/delta/spark/internal/v2/read/SparkScanTest.java
+++ b/spark/v2/src/test/java/io/delta/spark/internal/v2/read/SparkScanTest.java
@@ -3,7 +3,7 @@
import static org.junit.jupiter.api.Assertions.*;
import io.delta.spark.internal.v2.DeltaV2TestBase;
-import io.delta.spark.internal.v2.catalog.SparkTable;
+import io.delta.spark.internal.v2.catalog.DeltaV2Table;
import io.delta.spark.internal.v2.utils.ScalaUtils;
import java.io.File;
import java.lang.reflect.Field;
@@ -52,8 +52,8 @@ public static void setupPartitionedTable(@TempDir File tempDir) {
private final CaseInsensitiveStringMap options =
new CaseInsensitiveStringMap(new java.util.HashMap<>());
- private final SparkTable table =
- new SparkTable(
+ private final DeltaV2Table table =
+ new DeltaV2Table(
Identifier.of(new String[] {"spark_catalog", "default"}, tableName), tablePath, options);
protected static final Predicate cityPredicate =
@@ -156,8 +156,8 @@ public void testColumnarSupportModeWithUnsupportedSchema(@TempDir File tempDir)
"spark.sql.parquet.enableNestedColumnVectorizedReader",
"false",
() -> {
- SparkTable mapTable =
- new SparkTable(
+ DeltaV2Table mapTable =
+ new DeltaV2Table(
Identifier.of(new String[] {"spark_catalog", "default"}, mapTableName),
path,
options);
@@ -230,8 +230,8 @@ public void testColumnarSupportModeWithDeletionVectors(@TempDir File tempDir) th
dvTableName, dvPath));
spark.sql(String.format("INSERT INTO %s VALUES (1, 'a'), (2, 'b')", dvTableName));
- SparkTable dvTable =
- new SparkTable(
+ DeltaV2Table dvTable =
+ new DeltaV2Table(
Identifier.of(new String[] {"spark_catalog", "default"}, dvTableName),
dvPath,
options);
@@ -487,7 +487,7 @@ public void testDPP_integerFilter() throws Exception {
}
protected static void checkSupportsRuntimeFilters(
- SparkTable table,
+ DeltaV2Table table,
CaseInsensitiveStringMap scanOptions,
org.apache.spark.sql.connector.expressions.filter.Predicate[] runtimeFilters,
List remainingPartitionValueAfterDpp)
@@ -678,8 +678,8 @@ public void testNumRowsUnknownWhenSomeFilesLackStats(@TempDir File testDir) thro
spark.sql("INSERT INTO " + tblName + " VALUES (2, 'sh')");
// Table now has two AddFile entries: one with stats (first insert), one without (second).
- SparkTable mixedStatsTable =
- new SparkTable(
+ DeltaV2Table mixedStatsTable =
+ new DeltaV2Table(
Identifier.of(new String[] {"spark_catalog", "default"}, tblName), path, options);
withSQLConf(
@@ -1365,7 +1365,7 @@ public void testEstimateStatisticsWithCatalogStats_cboEnabled(@TempDir File temp
"true",
() -> {
Identifier id = Identifier.of(new String[] {"default"}, tblName);
- SparkTable sparkTable = new SparkTable(id, catalogTable, Collections.emptyMap());
+ DeltaV2Table sparkTable = new DeltaV2Table(id, catalogTable, Collections.emptyMap());
SparkScanBuilder builder =
(SparkScanBuilder)
@@ -1423,7 +1423,7 @@ public void testPerFileNumRowsPreferredOverCatalog(@TempDir File tempDir) throws
"true",
() -> {
Identifier id = Identifier.of(new String[] {"default"}, tblName);
- SparkTable sparkTable = new SparkTable(id, catalogTable, Collections.emptyMap());
+ DeltaV2Table sparkTable = new DeltaV2Table(id, catalogTable, Collections.emptyMap());
SparkScanBuilder builder =
(SparkScanBuilder)
sparkTable.newScanBuilder(new CaseInsensitiveStringMap(new HashMap<>()));
@@ -1469,7 +1469,7 @@ public void testCatalogNumRowsFallbackWhenPerFileUnknown(@TempDir File tempDir)
"true",
() -> {
Identifier id = Identifier.of(new String[] {"default"}, tblName);
- SparkTable sparkTable = new SparkTable(id, catalogTable, Collections.emptyMap());
+ DeltaV2Table sparkTable = new DeltaV2Table(id, catalogTable, Collections.emptyMap());
SparkScanBuilder builder =
(SparkScanBuilder)
sparkTable.newScanBuilder(new CaseInsensitiveStringMap(new HashMap<>()));
@@ -1518,7 +1518,7 @@ public void testEstimateStatisticsWithCatalogStats_cboDisabled(@TempDir File tem
"false",
() -> {
Identifier id = Identifier.of(new String[] {"default"}, tblName);
- SparkTable sparkTable = new SparkTable(id, catalogTable, Collections.emptyMap());
+ DeltaV2Table sparkTable = new DeltaV2Table(id, catalogTable, Collections.emptyMap());
SparkScanBuilder builder =
(SparkScanBuilder)
@@ -1564,7 +1564,8 @@ public void testEstimateStatisticsWithCatalogStats_planStatsEnabled(@TempDir Fil
"true",
() -> {
Identifier id = Identifier.of(new String[] {"default"}, tblName);
- SparkTable sparkTable = new SparkTable(id, catalogTable, Collections.emptyMap());
+ DeltaV2Table sparkTable =
+ new DeltaV2Table(id, catalogTable, Collections.emptyMap());
SparkScanBuilder builder =
(SparkScanBuilder)
@@ -1600,7 +1601,7 @@ public void testEstimateStatisticsWithoutCatalogStats(@TempDir File tempDir) thr
() -> {
// Path-based table — no catalog table, no ANALYZE TABLE stats
Identifier id = Identifier.of(new String[] {"default"}, tblName);
- SparkTable sparkTable = new SparkTable(id, path);
+ DeltaV2Table sparkTable = new DeltaV2Table(id, path);
SparkScanBuilder builder =
(SparkScanBuilder)
@@ -1668,7 +1669,7 @@ public void testEstimateStatisticsWithPartitionedTableAndCatalogStats(@TempDir F
"true",
() -> {
Identifier id = Identifier.of(new String[] {"default"}, tblName);
- SparkTable sparkTable = new SparkTable(id, catalogTable, Collections.emptyMap());
+ DeltaV2Table sparkTable = new DeltaV2Table(id, catalogTable, Collections.emptyMap());
SparkScanBuilder builder =
(SparkScanBuilder)
@@ -1734,7 +1735,8 @@ public void testEstimatedSizeUsesAvgLenFromCatalogStats(@TempDir File tempDir) t
"false",
() -> {
Identifier id = Identifier.of(new String[] {"default"}, tblName);
- SparkTable sparkTable = new SparkTable(id, catalogTable, Collections.emptyMap());
+ DeltaV2Table sparkTable =
+ new DeltaV2Table(id, catalogTable, Collections.emptyMap());
SparkScanBuilder builder =
(SparkScanBuilder)
@@ -1794,7 +1796,7 @@ public void testEstimateStatisticsWithoutAnalyze(@TempDir File tempDir) throws E
CatalogTable catalogTable =
spark.sessionState().catalog().getTableMetadata(new TableIdentifier(tblName));
Identifier id = Identifier.of(new String[] {"default"}, tblName);
- SparkTable sparkTable = new SparkTable(id, catalogTable, Collections.emptyMap());
+ DeltaV2Table sparkTable = new DeltaV2Table(id, catalogTable, Collections.emptyMap());
SparkScanBuilder builder =
(SparkScanBuilder)
@@ -1839,7 +1841,7 @@ public void testEstimateStatisticsWithCatalogStats_noNumRows(@TempDir File tempD
"true",
() -> {
Identifier id = Identifier.of(new String[] {"default"}, tblName);
- SparkTable sparkTable = new SparkTable(id, catalogTable, Collections.emptyMap());
+ DeltaV2Table sparkTable = new DeltaV2Table(id, catalogTable, Collections.emptyMap());
SparkScanBuilder builder =
(SparkScanBuilder)