Skip to content

Commit ffbefe9

Browse files
Row-Level Operations (no native implementations available)
1 parent 0f04f6f commit ffbefe9

File tree

7 files changed

+103
-7
lines changed

7 files changed

+103
-7
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# RowLevelOperation
2+
3+
`RowLevelOperation` is...FIXME

docs/connector/SupportsDelta.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: SupportsDelta
3+
---
4+
5+
# SupportsDelta Row-Level Operations
6+
7+
`SupportsDelta` is an [extension](#contract) of the [RowLevelOperation](RowLevelOperation.md) abstraction for [row-level operations](#implementations) with [rowId](#rowId).
8+
9+
## Contract (Subset)
10+
11+
### rowId { #rowId }
12+
13+
```java
14+
NamedReference[] rowId()
15+
```
16+
17+
row ID column references for row equality
18+
19+
Used when:
20+
21+
* [RewriteRowLevelCommand](../logical-analysis-rules/RewriteRowLevelCommand.md) logical analysis rule is executed (and [resolveRowIdAttrs](../logical-analysis-rules/RewriteRowLevelCommand.md#resolveRowIdAttrs))
22+
* [WriteDelta](../logical-operators/WriteDelta.md) logical operator is executed (and [rowIdAttrsResolved](../logical-operators/WriteDelta.md#rowIdAttrsResolved))
23+
24+
## Implementations
25+
26+
!!! note
27+
No built-in implementations available.

docs/logical-operators/RowLevelWrite.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,30 @@ title: RowLevelWrite
44

55
# RowLevelWrite Logical Operators
66

7-
`RowLevelWrite` is...FIXME
7+
`RowLevelWrite` is an [extension](#contract) of the [V2WriteCommand](V2WriteCommand.md) abstraction for [write commands](#implementations) with [SupportsSubquery](SupportsSubquery.md).
8+
9+
## Contract (Subset)
10+
11+
### operation
12+
13+
```scala
14+
operation: RowLevelOperation
15+
```
16+
17+
See:
18+
19+
* [ReplaceData](ReplaceData.md#operation)
20+
* [WriteDelta](WriteDelta.md#operation)
21+
22+
Used when:
23+
24+
* `GroupBasedRowLevelOperation` is requested to `unapply`
25+
* `WriteDelta` is requested to [metadataAttrsResolved](WriteDelta.md#metadataAttrsResolved), [rowIdAttrsResolved](WriteDelta.md#rowIdAttrsResolved)
26+
* `GroupBasedRowLevelOperationScanPlanning` is requested to [apply](../logical-optimizations/GroupBasedRowLevelOperationScanPlanning.md#apply)
27+
* `RewrittenRowLevelCommand` is requested to `unapply`
28+
* `RowLevelOperationRuntimeGroupFiltering` is requested to `apply`
29+
30+
## Implementations
31+
32+
* [ReplaceData](ReplaceData.md)
33+
* [WriteDelta](WriteDelta.md)

docs/logical-operators/WriteDelta.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,25 @@ title: WriteDelta
44

55
# WriteDelta Logical Operator
66

7-
`WriteDelta` is...FIXME
7+
`WriteDelta` is a [RowLevelWrite](RowLevelWrite.md) logical operator.
8+
9+
## Creating Instance
10+
11+
`WriteDelta` takes the following to be created:
12+
13+
* <span id="table"> Table ([NamedRelation](NamedRelation.md))
14+
* <span id="condition"> Condition ([Expression](../expressions/Expression.md))
15+
* <span id="query"> Query ([LogicalPlan](LogicalPlan.md))
16+
* <span id="originalTable"> Original Table ([NamedRelation](NamedRelation.md))
17+
* <span id="projections"> `WriteDeltaProjections`
18+
* <span id="write"> `DeltaWrite`
19+
20+
`WriteDelta` is created when:
21+
22+
* [RewriteDeleteFromTable](../logical-analysis-rules/RewriteDeleteFromTable.md) logical analysis rule is executed (and requested to [buildWriteDeltaPlan](../logical-analysis-rules/RewriteDeleteFromTable.md#buildWriteDeltaPlan) for [SupportsDelta](../connector/SupportsDelta.md) row-level operations)
23+
* `RewriteMergeIntoTable` logical analysis rule is executed (and `buildWriteDeltaPlan` for [SupportsDelta](../connector/SupportsDelta.md) row-level operations)
24+
* `RewriteUpdateTable` logical analysis rule is executed (and `buildWriteDeltaPlan` for [SupportsDelta](../connector/SupportsDelta.md) row-level operations)
25+
26+
## Query Planning
27+
28+
`WriteDelta` is planned to [WriteDeltaExec](../physical-operators/WriteDeltaExec.md) physical operator by [DataSourceV2Strategy](../execution-planning-strategies/DataSourceV2Strategy.md) execution planning strategy.

docs/physical-operators/V2ExistingTableWriteExec.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Used when:
1818

1919
* `V2ExistingTableWriteExec` is [executed](#run)
2020

21-
### write { #write }
21+
### write
2222

2323
```scala
2424
write: Write
@@ -32,11 +32,9 @@ Used when:
3232

3333
## Implementations
3434

35-
* `AppendDataExec`
3635
* [OverwriteByExpressionExec](OverwriteByExpressionExec.md)
37-
* `OverwritePartitionsDynamicExec`
38-
* `ReplaceDataExec`
39-
* `WriteDeltaExec`
36+
* [WriteDeltaExec](WriteDeltaExec.md)
37+
* _others_
4038

4139
## Executing Command { #run }
4240

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: WriteDeltaExec
3+
---
4+
5+
# WriteDeltaExec Physical Operator
6+
7+
`WriteDeltaExec` is a [V2ExistingTableWriteExec](V2ExistingTableWriteExec.md) physical operator that represents a [WriteDelta](../logical-operators/WriteDelta.md) logical operator at execution time.
8+
9+
## Creating Instance
10+
11+
`WriteDeltaExec` takes the following to be created:
12+
13+
* <span id="query"> Query Physical Plan ([SparkPlan](SparkPlan.md))
14+
* <span id="refreshCache"> `refreshCache` function (`() => Unit`)
15+
* <span id="projections"> `WriteDeltaProjections`
16+
* <span id="write"> `DeltaWrite`
17+
18+
`WriteDeltaExec` is created when:
19+
20+
* [DataSourceV2Strategy](../execution-planning-strategies/DataSourceV2Strategy.md) execution planning strategy is executed (to plan a [WriteDelta](../logical-operators/WriteDelta.md) logical operator)

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ nav:
456456
- WindowExec:
457457
- WindowExec: physical-operators/WindowExec.md
458458
- WindowExecBase: physical-operators/WindowExecBase.md
459+
- WriteDeltaExec: physical-operators/WriteDeltaExec.md
459460
- WriteFilesExec: physical-operators/WriteFilesExec.md
460461
- Distribution and Partitioning:
461462
- Distribution: physical-operators/Distribution.md

0 commit comments

Comments
 (0)