ColumnWithDefaultExprUtils¶
IDENTITY Columns feature is unsupported yet
Protocol.requiredMinimumProtocol throws an AnalysisException
when a delta table uses identity columns:
IDENTITY column is not supported
IDENTITY_MIN_WRITER_VERSION¶
ColumnWithDefaultExprUtils
uses 6
as the minimum version of a writer for writing to IDENTITY
columns.
IDENTITY_MIN_WRITER_VERSION
is used when:
ColumnWithDefaultExprUtils
is used to satisfyProtocolProtocol
utility is used to determine the required minimum protocol
columnHasDefaultExpr¶
columnHasDefaultExpr(
protocol: Protocol,
col: StructField): Boolean
columnHasDefaultExpr
is an alias of GeneratedColumn.isGeneratedColumn.
columnHasDefaultExpr
is used when:
DeltaAnalysis
logical resolution rule is requested toresolveQueryColumnsByName
hasIdentityColumn¶
hasIdentityColumn(
schema: StructType): Boolean
hasIdentityColumn
returns true
if the given StructType
(Spark SQL) contains an IDENTITY column.
hasIdentityColumn
is used when:
Protocol
utility is used for the required minimum protocol
isIdentityColumn¶
isIdentityColumn(
field: StructField): Boolean
isIdentityColumn
is used to find out whether a StructField
is an identity column or not.
isIdentityColumn
uses the Metadata
(of the given StructField
) to check the existence of the following metadata keys:
isIdentityColumn
is used when:
ColumnWithDefaultExprUtils
is used to addDefaultExprsOrReturnConstraints, columnHasDefaultExpr, hasIdentityColumn and removeDefaultExpressionsIdentityColumn
is requested to blockExplicitIdentityColumnInsert, getIdentityColumns, syncIdentity, updateSchema, updateToValidHighWaterMarkDeltaCatalog
is requested to alterTable and createDeltaTableMergeIntoCommandBase
is requested to checkIdentityColumnHighWaterMarksWriteIntoDelta
is requested to writeAndReturnCommitData
Remove Default Expressions from Table Schema¶
removeDefaultExpressions(
schema: StructType,
keepGeneratedColumns: Boolean = false,
keepIdentityColumns: Boolean = false): StructType
removeDefaultExpressions
...FIXME
removeDefaultExpressions
is used when:
DeltaTableUtils
is requested to removeInternalWriterMetadataOptimisticTransactionImpl
is requested to updateMetadataInternal
tableHasDefaultExpr¶
tableHasDefaultExpr(
protocol: Protocol,
metadata: Metadata): Boolean
tableHasDefaultExpr
enforcesGeneratedColumns.
tableHasDefaultExpr
is used when:
TransactionalWrite
is requested to normalizeData