object Protocol extends Serializable
- Alphabetic
- By Inheritance
- Protocol
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val MIN_READER_VERSION_PROP: String
- val MIN_WRITER_VERSION_PROP: String
- def apply(minReaderVersion: Int = Action.readerVersion, minWriterVersion: Int = Action.writerVersion): Protocol
Construct a Protocol case class of the given reader and writer versions.
Construct a Protocol case class of the given reader and writer versions. This method will initialize table features fields when reader and writer versions are capable.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def assertTablePropertyConstraintsSatisfied(spark: SparkSession, metadata: Metadata, snapshot: Snapshot): Unit
Verify that the table properties satisfy legality constraints.
Verify that the table properties satisfy legality constraints. Throw an exception if not.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def extractAutomaticallyEnabledFeatures(spark: SparkSession, metadata: Metadata, protocol: Option[Protocol] = None): Set[TableFeature]
Extracts all table features that are enabled by the given metadata and the optional protocol.
Extracts all table features that are enabled by the given metadata and the optional protocol. This includes all already enabled features (if a protocol is provided), the features enabled directly by metadata, and all of their (transitive) dependencies.
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def forNewTable(spark: SparkSession, metadataOpt: Option[Metadata]): Protocol
Picks the protocol version for a new table given the Delta table metadata.
Picks the protocol version for a new table given the Delta table metadata. The result satisfies all active features in the metadata and protocol-related configs in table properties, i.e., configs with keys MIN_READER_VERSION_PROP, MIN_WRITER_VERSION_PROP, and FEATURE_PROP_PREFIX. This method will also consider protocol-related configs: default reader version, default writer version, and features enabled by DEFAULT_FEATURE_PROP_PREFIX.
- def forTableFeature(tf: TableFeature): Protocol
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getProtocolVersionsFromTableConf(conf: Map[String, String]): (Option[Int], Option[Int])
- def getReaderVersionFromTableConf(conf: Map[String, String]): Option[Int]
- def getWriterVersionFromTableConf(conf: Map[String, String]): Option[Int]
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def minProtocolComponentsFromAutomaticallyEnabledFeatures(spark: SparkSession, metadata: Metadata): (Int, Int, Set[TableFeature])
Given the Delta table metadata, returns the minimum required reader and writer version that satisfies all enabled table features in the metadata plus all enabled features as a set.
Given the Delta table metadata, returns the minimum required reader and writer version that satisfies all enabled table features in the metadata plus all enabled features as a set.
This function returns the protocol versions and features individually instead of a Protocol, so the caller can identify the features that caused the protocol version. For example, if the return values are (2, 5, columnMapping), the caller can safely ignore all other features required by the protocol with a reader and writer version of 2 and 5.
This method does not process protocol-related configs in table properties or session defaults, i.e., configs with keys MIN_READER_VERSION_PROP, MIN_WRITER_VERSION_PROP, and FEATURE_PROP_PREFIX.
- def minProtocolComponentsFromMetadata(spark: SparkSession, metadata: Metadata): (Int, Int, Set[TableFeature])
Given the Delta table metadata, returns the minimum required reader and writer version that satisfies all enabled features in the metadata and protocol-related configs in table properties, i.e., configs with keys MIN_READER_VERSION_PROP, MIN_WRITER_VERSION_PROP, and FEATURE_PROP_PREFIX.
Given the Delta table metadata, returns the minimum required reader and writer version that satisfies all enabled features in the metadata and protocol-related configs in table properties, i.e., configs with keys MIN_READER_VERSION_PROP, MIN_WRITER_VERSION_PROP, and FEATURE_PROP_PREFIX.
This function returns the protocol versions and features individually instead of a Protocol, so the caller can identify the features that caused the protocol version. For example, if the return values are (2, 5, columnMapping), the caller can safely ignore all other features required by the protocol with a reader and writer version of 2 and 5.
Note that this method does not consider protocol versions and features configured in session defaults. To make them effective, copy them to
metadatausing DeltaConfigs.mergeGlobalConfigs. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def upgradeProtocolFromMetadataForExistingTable(spark: SparkSession, metadata: Metadata, current: Protocol): Option[Protocol]
Upgrade the current protocol to satisfy all auto-update capable features required by the table metadata.
Upgrade the current protocol to satisfy all auto-update capable features required by the table metadata. An Delta error will be thrown if a non-auto-update capable feature is required by the metadata and not in the resulting protocol, in such a case the user must run
ALTER TABLEto add support for this feature beforehand using thedelta.feature.featureNametable property.Refer to FeatureAutomaticallyEnabledByMetadata.automaticallyUpdateProtocolOfExistingTables to know more about "auto-update capable" features.
Note: this method only considers metadata-enabled features. To avoid confusion, the caller must apply and remove protocol-related table properties from the metadata before calling this method.
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()