Fixed
Details
Assignee
Yoann RodièreYoann RodièreReporter
Yoann RodièreYoann RodièreSprint
NoneFix versions
Priority
Major
Details
Details
Assignee
Yoann Rodière
Yoann RodièreReporter
Yoann Rodière
Yoann RodièreSprint
None
Fix versions
Priority
Created December 19, 2019 at 8:41 AM
Updated January 22, 2020 at 2:18 PM
Resolved January 20, 2020 at 1:06 PM
UPDATE: this was originally filed as a bug claiming there could be an NPE in this case. This assertion was wrong, however we indeed used not to test this scenario, so we're still going to merge a patch to expand the test coverage.
Original ticket description:
I did not check, but judging from the code that is what will happen. See how
OnTheFlyNestedSorted
(renamed toDocValuesJoin
after https://hibernate.atlassian.net/browse/HSEARCH-3797#icft=HSEARCH-3797) accepts primitive values for themissingValue
parameter, while the caller hold an object value which should be null when the user didn't call.missingLast()
/.missingAs()
/.missingFirst()
.We should add a test and fix this.
Ideally we should make
OnTheFlyNestedSorted
/DocValuesJoin
accept a nullmissingValue
and return false fromadvanceExact
when a value is missing. This would allow using the same class for projections on docvalues.If it's too hard to implement, another solution (perhaps easier) would be to just set a default
missingValue
to0.0f
, for example. That's howorg.apache.lucene.search.FieldComparator.FloatComparator#getValueForDoc
behaves when a value is not found in a document anyway.I'm not sure setting a default "missing value behavior" would be the solution: maybe Lucene has a built-in