Skip to content

Adding new Mutation constructor with ByteSequence parameter to remove 1 TODO#6463

Open
Amemeda wants to merge 4 commits into
apache:mainfrom
Amemeda:mutation-todo
Open

Adding new Mutation constructor with ByteSequence parameter to remove 1 TODO#6463
Amemeda wants to merge 4 commits into
apache:mainfrom
Amemeda:mutation-todo

Conversation

@Amemeda

@Amemeda Amemeda commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Removing TODO add ByteSequence methods to mutations from line 63 of ConditionalMutation.java

Updated Mutation.java

  • Added new constructor with ByteSequence row parameter
  • Added new methods init and copyIfNeeded based on implementation from Key.java
  • Added new get method to get row as a ByteSequence

Updated MutationTest.java

  • Added new test testByteSequenceConstructor

@Amemeda

Amemeda commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Removes 1 TODO from #2699

@Amemeda Amemeda marked this pull request as ready for review July 7, 2026 19:21

public ConditionalMutation(ByteSequence row, Condition... conditions) {
// TODO add ByteSequence methods to mutations
super(row.toArray());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming the new constructor would be called here too. I'm curious how many places in the code would take advantage of the new constructor for the amount of code that it adds to Mutation. If there are not many places, then I think it might be better to just remove the TODO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants