Currently the update implementation of MERGE update updates the whole row, this pr is going to update the engine merge impl to support partial update.
The main idea is to keep the merge case_number of the UpdateCase in the output of the MergeProcessNode,(this value already kept in the merge_row symbol that in the sourceNode of the MergeProcessNode, so only needs to project it), and then in the MergeWriterNode, the updateSink can perform the update according to the update case.
The partial update also needs to know the mapping of the case number with the relevant columns, thus the ConnectorMetadata#beginMerge is refactored to hold the info.
Here use the Phoenix connector as a example to show how it works.
( ) This is not user-visible or is docs only, and no release notes are required.
(x) Release notes are required. Please propose a release note for me.
() Release notes are required, with the following suggested text:
## Section
* Support partial update in engine.
* Support partial update in Phoenix.
Description
Currently the
update
implementation of MERGE update updates the whole row, this pr is going to update the engine merge impl to support partial update. The main idea is to keep themerge case_number
of theUpdateCase
in the output of theMergeProcessNode
,(this value already kept in themerge_row
symbol that in the sourceNode of theMergeProcessNode
, so only needs to project it), and then in theMergeWriterNode
, theupdateSink
can perform the update according to the update case.The partial update also needs to know the mapping of the case number with the relevant columns, thus the
ConnectorMetadata#beginMerge
is refactored to hold the info.Here use the Phoenix connector as a example to show how it works.
Additional context and related issues
Prerequisites for https://github.com/trinodb/trino/pull/23034
Release notes
( ) This is not user-visible or is docs only, and no release notes are required. (x) Release notes are required. Please propose a release note for me. () Release notes are required, with the following suggested text: