Skip to content

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:

columnHasDefaultExpr

columnHasDefaultExpr(
  protocol: Protocol,
  col: StructField): Boolean

columnHasDefaultExpr is an alias of GeneratedColumn.isGeneratedColumn.

columnHasDefaultExpr is used when:

  • DeltaAnalysis logical resolution rule is requested to resolveQueryColumnsByName

hasIdentityColumn

hasIdentityColumn(
  schema: StructType): Boolean

hasIdentityColumn returns true if the given StructType (Spark SQL) contains an IDENTITY column.

hasIdentityColumn is used when:

isIdentityColumn

isIdentityColumn(
  field: StructField): Boolean

isIdentityColumn uses the Metadata (of the given StructField) to check the existence of delta.identity.start, delta.identity.step and delta.identity.allowExplicitInsert metadata keys.

IDENTITY column

IDENTITY column is a column with delta.identity.start, delta.identity.step and delta.identity.allowExplicitInsert metadata.

isIdentityColumn is used when:

Removing Default Expressions

removeDefaultExpressions(
  schema: StructType,
  keepGeneratedColumns: Boolean = false): StructType

removeDefaultExpressions...FIXME

removeDefaultExpressions is used when:

tableHasDefaultExpr

tableHasDefaultExpr(
  protocol: Protocol,
  metadata: Metadata): Boolean

tableHasDefaultExpr enforcesGeneratedColumns.


tableHasDefaultExpr is used when: