Skip to content

Support multiple Update operations for the same column #1525

Open
@ivan-zaitsev

Description

@ivan-zaitsev

Update stores one column name as key and one operation as value.

Because of this it is not possible to update several keys for column with map type.

Example of code:

CREATE TABLE data (fields map<VARCHAR, VARCHAR>);
List<Update.AssignmentOp> updateOperations = new LinkedList<>();
updateOperations.add(new Update.SetAtKeyOp(ColumnName.from("map"), "key1", "value1"));
updateOperations.add(new Update.SetAtKeyOp(ColumnName.from("map"), "key2", "value2"));
Update update = Update.of(updateOperations);

OR

Update update = Update.empty()
        .set("map").atKey("key1").to("value1")
        .set("map").atKey("key2").to("value2");

only one of operations will be present in update object.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions