-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add test for float vector values in FlatVectorsScorer impls #13851
Conversation
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.
I verified that this test passes with the bug fix but fails without it.
|
||
var supplier1 = DEFAULT_SCORER.getRandomVectorScorerSupplier(sim, vectorValues); | ||
var supplier2 = MEMSEG_SCORER.getRandomVectorScorerSupplier(sim, vectorValues); | ||
// these assertion assumes that the supplier and scorer's toString will have float |
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.
"assertions assume"?
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.
too bad we can't access the underlying vector values to see what its vectorEncoding is, but this checking toString() seems sort of OK?
assertEquals(scorer2.score(0), expected, DELTA); | ||
|
||
expectThrows( | ||
Throwable.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.
Is Throwable the most specific we can assert?
This is a test only change that verifies the behaviour when float vector values are passed to our FlatVectorsScorer implementations. This would have caught the bug causing #13844, subsequently fixed by #13850.