-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95a98b0
commit 1fd7139
Showing
18 changed files
with
266 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: CheckUnresolvedRelationTimeTravel | ||
--- | ||
|
||
# CheckUnresolvedRelationTimeTravel Logical Check Analysis Rule | ||
|
||
`CheckUnresolvedRelationTimeTravel` is...FIXME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# DeltaUnsupportedOperationsCheck | ||
--- | ||
title: DeltaUnsupportedOperationsCheck | ||
--- | ||
|
||
**DeltaUnsupportedOperationsCheck** is a logical check rule that adds helpful error messages when Delta is being used with unsupported Hive operations or if an unsupported operation is executed. | ||
# DeltaUnsupportedOperationsCheck Logical Check Analysis Rule | ||
|
||
`DeltaUnsupportedOperationsCheck` is a logical check rule that adds helpful error messages when Delta is being used with unsupported Hive operations or if an unsupported operation is executed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: PostHocResolveUpCast | ||
--- | ||
|
||
# PostHocResolveUpCast Post-Hoc Resolution Rule | ||
|
||
`PostHocResolveUpCast` is...FIXME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: ResolveDeltaPathTable | ||
--- | ||
|
||
# ResolveDeltaPathTable Logical Resolution Rule | ||
|
||
`ResolveDeltaPathTable` is...FIXME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: PreprocessTableWithDVsStrategy | ||
--- | ||
|
||
# PreprocessTableWithDVsStrategy Execution Planning Strategy | ||
|
||
`PreprocessTableWithDVsStrategy` is...FIXME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# DeltaScanWithRowTrackingEnabled | ||
|
||
`DeltaScanWithRowTrackingEnabled` is a Scala extractor object to [match a scan on a delta table with Row Tracking enabled](#unapply). | ||
|
||
??? note "Scala Extractor Object" | ||
`DeltaScanWithRowTrackingEnabled` is a Scala extractor object (with an [unapply](#unapply) method) to match a pattern and extract data values. | ||
|
||
Learn more in the [Scala Language Specification]({{ scala.spec }}/08-pattern-matching.html#extractor-patterns) and the [Tour of Scala](https://docs.scala-lang.org/tour/extractor-objects.html). | ||
|
||
## unapply { #unapply } | ||
|
||
```scala | ||
unapply( | ||
plan: LogicalPlan): Option[LogicalRelation] | ||
``` | ||
|
||
`unapply` returns the given `LogicalPlan` if it is a `LogicalRelation` over a `HadoopFsRelation` with a [DeltaParquetFileFormat](../DeltaParquetFileFormat.md) with [Row Tracking enabled](RowTracking.md#isEnabled). Otherwise, `unapply` returns `None` (_nothing matches_). | ||
|
||
--- | ||
|
||
`unapply` is used when: | ||
|
||
* [GenerateRowIDs](GenerateRowIDs.md) logical rule is executed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: GenerateRowIDs | ||
--- | ||
|
||
# GenerateRowIDs Logical Plan Normalization Rule | ||
|
||
`GenerateRowIDs` is a logical rule (`Rule[LogicalPlan]`) that Delta Lake injects into `SparkSession` (using [DeltaSparkSessionExtension](../DeltaSparkSessionExtension.md)). | ||
|
||
## Executing Rule { #apply } | ||
|
||
??? note "Rule" | ||
|
||
```scala | ||
apply( | ||
plan: LogicalPlan): LogicalPlan | ||
``` | ||
|
||
`apply` is part of the `Rule` ([Spark SQL]({{ book.spark_sql }}/catalyst/Rule#apply)) abstraction. | ||
|
||
`apply` transforms the [scans on delta tables with Row Tracking enabled](DeltaScanWithRowTrackingEnabled.md) in the given `LogicalPlan` ([Spark SQL]({{ book.spark_sql }}/logical-operators/LogicalPlan)) bottom-up. | ||
|
||
`apply`...FIXME | ||
|
||
### metadataWithRowTrackingColumnsProjection { #metadataWithRowTrackingColumnsProjection } | ||
|
||
```scala | ||
metadataWithRowTrackingColumnsProjection( | ||
metadata: AttributeReference): NamedExpression | ||
``` | ||
|
||
`metadataWithRowTrackingColumnsProjection`...FIXME | ||
|
||
### rowIdExpr { #rowIdExpr } | ||
|
||
```scala | ||
rowIdExpr( | ||
metadata: AttributeReference): Expression | ||
``` | ||
|
||
`rowIdExpr` creates a `Coalesce` expression with the following expressions: | ||
|
||
1. `row_id` (sub)attribute of the given `AttributeReference` | ||
``` | ||
_metadata.row_id | ||
``` | ||
1. `Add` expression of the `base_row_id` and `row_index` attributes of the given `AttributeReference` | ||
|
||
``` | ||
_metadata.base_row_id + _metadata.row_index | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# MaterializedRowCommitVersion | ||
|
||
`MaterializedRowCommitVersion` is...FIXME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# MaterializedRowTrackingColumn | ||
|
||
`MaterializedRowTrackingColumn` is...FIXME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# MetadataStructField | ||
|
||
`MetadataStructField` is...FIXME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# RowCommitVersion | ||
|
||
## row_commit_version { #METADATA_STRUCT_FIELD_NAME } | ||
|
||
`RowCommitVersion` object defines `row_commit_version` for...FIXME | ||
|
||
## \_metadata.row_commit_version { #QUALIFIED_COLUMN_NAME } | ||
|
||
`RowCommitVersion` object defines `_metadata.row_commit_version` for...FIXME | ||
|
||
## createMetadataStructField { #createMetadataStructField } | ||
|
||
```scala | ||
createMetadataStructField( | ||
protocol: Protocol, | ||
metadata: Metadata, | ||
nullable: Boolean = false): Option[StructField] | ||
``` | ||
|
||
`createMetadataStructField` creates a [MetadataStructField](MetadataStructField.md) with the [materializedColumnName](MaterializedRowCommitVersion.md#getMaterializedColumnName) (for the given [Protocol](../Protocol.md) and [Metadata](../Metadata.md)). | ||
|
||
--- | ||
|
||
`createMetadataStructField` is used when: | ||
|
||
* `RowTracking` is requested to [createMetadataStructFields](RowTracking.md#createMetadataStructFields) |
Oops, something went wrong.