Class V2TableUtil
Object
org.apache.spark.sql.connector.catalog.V2TableUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.spark.sql.internal.SQLConfconf()static scala.collection.immutable.Seq<MetadataColumn>extractMetadataColumns(org.apache.spark.sql.execution.datasources.v2.DataSourceV2Relation relation) static StringtoQualifiedName(CatalogPlugin catalog, Identifier ident) static scala.collection.immutable.Seq<String>validateCapturedColumns(Table table, org.apache.spark.sql.execution.datasources.v2.DataSourceV2Relation relation) Validates that captured data columns match the current table schema.static scala.collection.immutable.Seq<String>validateCapturedColumns(Table table, scala.collection.immutable.Seq<Column> originCols) Validates that captured data columns match the current table schema.static scala.collection.immutable.Seq<String>validateCapturedMetadataColumns(Table table, org.apache.spark.sql.execution.datasources.v2.DataSourceV2Relation relation) Validates that captured metadata columns are consistent with the current table metadata.static scala.collection.immutable.Seq<String>validateCapturedMetadataColumns(Table table, scala.collection.immutable.Seq<MetadataColumn> originMetaCols) Validates that captured metadata columns are consistent with the current table metadata.
-
Constructor Details
-
V2TableUtil
public V2TableUtil()
-
-
Method Details
-
toQualifiedName
-
validateCapturedColumns
public static scala.collection.immutable.Seq<String> validateCapturedColumns(Table table, org.apache.spark.sql.execution.datasources.v2.DataSourceV2Relation relation) Validates that captured data columns match the current table schema.- Parameters:
table- the current table metadatarelation- the relation with captured columns- Returns:
- validation errors, or empty sequence if valid
-
validateCapturedColumns
public static scala.collection.immutable.Seq<String> validateCapturedColumns(Table table, scala.collection.immutable.Seq<Column> originCols) Validates that captured data columns match the current table schema.Checks for: - Column type or nullability changes - Removed columns (missing from the current table schema) - Added columns (new in the current table schema)
- Parameters:
table- the current table metadataoriginCols- the originally captured columns- Returns:
- validation errors, or empty sequence if valid
-
validateCapturedMetadataColumns
public static scala.collection.immutable.Seq<String> validateCapturedMetadataColumns(Table table, org.apache.spark.sql.execution.datasources.v2.DataSourceV2Relation relation) Validates that captured metadata columns are consistent with the current table metadata.- Parameters:
table- the current table metadatarelation- the relation with captured metadata columns- Returns:
- validation errors, or empty sequence if valid
-
extractMetadataColumns
public static scala.collection.immutable.Seq<MetadataColumn> extractMetadataColumns(org.apache.spark.sql.execution.datasources.v2.DataSourceV2Relation relation) -
validateCapturedMetadataColumns
public static scala.collection.immutable.Seq<String> validateCapturedMetadataColumns(Table table, scala.collection.immutable.Seq<MetadataColumn> originMetaCols) Validates that captured metadata columns are consistent with the current table metadata.Checks for: - Metadata column type or nullability changes - Removed metadata columns (missing from current table)
- Parameters:
table- the current table metadataoriginMetaCols- the originally captured metadata columns- Returns:
- validation errors, or empty sequence if valid
-
conf
public static org.apache.spark.sql.internal.SQLConf conf()
-