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
Batch insert: fix inserting constant 'null' #1762
Conversation
82a6d02
to
361562e
Compare
@@ -67,6 +67,21 @@ public void testInsertSingleIteratorNoTx() { | |||
assertThat(b.size()).isEqualTo(2); | |||
} | |||
|
|||
@Test | |||
public void testBindConstantNull() { | |||
UsesBatching b = handle.attach(UsesBatching.class); |
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.
avoid single-letter variables please (aside from the meme i
for iterations, I'd say Handle h
at most could also be a meme in our context since it's so common)
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.
Ah, this is all just clone of existing tests, with only one other change...
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.
Sounds like the improvement could be made in 2 places :)
|
||
b.withConstantValue(ids, null); | ||
|
||
assertThat(b.size()).isEqualTo(5); |
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.
isn't there a hasSize
?
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 isn't a Collection, so that doesn't apply.
361562e
to
d5df6a3
Compare
Fixes #1761