Package io.trino.operator
Class ChangeOnlyUpdatedColumnsMergeProcessor
java.lang.Object
io.trino.operator.ChangeOnlyUpdatedColumnsMergeProcessor
- All Implemented Interfaces:
MergeRowChangeProcessor
public class ChangeOnlyUpdatedColumnsMergeProcessor
extends Object
implements MergeRowChangeProcessor
The transformPage() method in this class does two things:
- Transform the input page into an "update" page format
- Removes all rows whose operation number is DEFAULT_CASE_OPERATION_NUMBER
-
Field Summary
Fields inherited from interface io.trino.operator.MergeRowChangeProcessor
DEFAULT_CASE_OPERATION_NUMBER -
Constructor Summary
ConstructorsConstructorDescriptionChangeOnlyUpdatedColumnsMergeProcessor(int rowIdChannel, int mergeRowChannel, List<Integer> dataColumnChannels, List<Integer> redistributionColumnChannels) -
Method Summary
Modifier and TypeMethodDescriptiontransformPage(Page inputPage) Transform a page generated by an SQL MERGE operation into page of data columns and operations.
-
Constructor Details
-
ChangeOnlyUpdatedColumnsMergeProcessor
-
-
Method Details
-
transformPage
Description copied from interface:MergeRowChangeProcessorTransform a page generated by an SQL MERGE operation into page of data columns and operations. The SQL MERGE input page consists of the following:- The write redistribution columns, if any
- For partitioned or bucketed tables, a hash value column
- The rowId column for the row from the target table if matched, or null if not matched
- The merge case row block
- All data columns, in table column order
The operation block- The rowId block
- The last column in the resulting page is 1 if the row is an insert derived from an update, and zero otherwise.
The
DeleteAndInsertMergeProcessorimplementation will transform each UPDATE row into multiple rows: an INSERT row and a DELETE row.- Specified by:
transformPagein interfaceMergeRowChangeProcessor
-