Skip to content

ResolveDeltaPathTable Logical Resolution Rule

ResolveDeltaPathTable is a logical resolution rule to resolve "path-identified" delta tables (direct query on files).

Spark SQL

In Spark SQL words, ResolveDeltaPathTable is a Catalyst Rule (Spark SQL) to resolve UnresolvedTable (Spark SQL) leaf logical operators.

ResolveDeltaPathTable is registered (injected) using DeltaSparkSessionExtension.

resolveAsPathTable

resolveAsPathTable(
  sparkSession: SparkSession,
  multipartIdentifier: Seq[String],
  options: Map[String, String]): Option[ResolvedTable]

resolveAsPathTable asserts that there is support for datasource.path as table identifiers in SQL queries (based on spark.sql.runSQLOnFiles (Spark SQL)) and that there are exactly two parts in the given multipartIdentifier.

resolveAsPathTable assumes that neither spark.sql.runSQLOnFiles (Spark SQL) configuration property is disabled nor there are exactly two parts in the given multipartIdentifier. If either holds, resolveAsPathTable returns None (undefined value).

resolveAsPathTable creates a DeltaTableV2 for a valid table identifier.

resolveAsPathTable uses a session CatalogManager (Spark SQL) to access the TableCatalog (based on spark.sql.catalog.spark_catalog (Spark SQL)).

In the end, resolveAsPathTable creates a ResolvedTable (Spark SQL) with the DeltaTableV2 (and the TableCatalog).

For all other cases, resolveAsPathTable return None (undefined value).