-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor operations and their builders #2329
Conversation
@@ -18,6 +19,16 @@ | |||
@NotThreadSafe | |||
public class Delete extends Mutation { | |||
|
|||
Delete( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added constructors to set all parameters for operations.
} | ||
|
||
return delete; | ||
return new Delete( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the added constructors in operation builders.
private final Optional<Key> clusteringKey; | ||
private Optional<String> namespace; | ||
private Optional<String> tableName; | ||
@Nullable private final Key clusteringKey; | ||
@Nullable private String namespace; | ||
private String tableName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stopped using Optional
in operations.
40576ee
to
4045728
Compare
4045728
to
adb8fa7
Compare
@@ -1221,13 +1207,15 @@ public BuildableScanFromExistingWithOngoingWhereOr whereOr( | |||
public BuildableScanOrScanAllFromExisting clearStart() { | |||
checkNotScanWithIndexOrScanAll(); | |||
this.startClusteringKey = null; | |||
this.startInclusive = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a (very minor) compatibility issue for those who expect this method to keep the inclusion setting? I think this is a reasonable bugfix, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strictly speaking, it could be. But we basically don't use startInclusive
if startClusteringKey
is null, so this shouldn't cause any issues actually. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
Description
This PR refactors operations (Get, Scan, Put, Insert, Upsert, Update, and Delete) and their builders.
Related issues and/or PRs
N/A
Changes made
Checklist
Additional notes (optional)
N/A
Release notes
N/A