-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fix ScanBuilder bug #1045
Fix ScanBuilder bug #1045
Conversation
this.limit = buildable.limit; | ||
this.projections.addAll(buildable.projections); | ||
this.orderings.addAll(buildable.orderings); | ||
this.consistency = buildable.consistency; |
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.
We should also pass these parameters here.
.projections(Arrays.asList("pk1", "ck1")) | ||
.projection("ck2") | ||
.projections("ck3", "ck4") | ||
.where(ConditionBuilder.column("ck1").isGreaterThanInt(10)) |
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.
We call projection()
and projections()
before calling where()
here, and we lost the values with the bug.
.limit(10) | ||
.where(ConditionBuilder.column("ck1").isGreaterThanInt(10)) |
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.
We call limit()
before calling where()
here, and we lost the value with the bug.
.ordering(ordering1) | ||
.orderings(Arrays.asList(ordering2, ordering3)) | ||
.orderings(ordering4, ordering5) | ||
.where(ConditionBuilder.column("ck1").isGreaterThanInt(10)) |
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.
We call ordering()
/orderings()
before calling where()
here, and we lost the values with the bug.
.consistency(Consistency.EVENTUAL) | ||
.where(ConditionBuilder.column("ck1").isGreaterThanInt(10)) |
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.
We call consistency()
before calling where()
here, and we lost the value with the bug.
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 for the fix. It's my mad. I should have added more tests and noticed it when fixing a similar bug before.
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!
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!
I encountered a bug where ScanBuilder doesn't create a proper
ScanAll
instance when we callprojection()
/projections()
/ordering()
/orderings()
/limit()
/consistency()
before callingwhere()
. I'll add inline comments for the details. Please take a look!