clintropolis opened a new pull request #9251: fix issue with long column predicate matcher based filters and nulls URL: https://github.com/apache/druid/pull/9251 ### Description This PR fixes an issue with predicate filters, such as a bound filter, on long columns with numeric nulls, where it will incorrectly compare `0` instead of calling `predicate.applyNull()`. The correct code is actually in place already in `LongValueMatcherColumnSelectorStrategy`, but this was getting pre-empted by `Filters.makeValueMatcher` which had it's own predicate defined specifically handling long columns, along with a code comment: ``` // This should be folded into the ValueMatcherColumnSelectorStrategy once that can handle LONG typed columns. ``` Unfortunately, it just hadn't been done yet. Prior to this PR, the added `testLongPredicateFilterNulls` in `CalciteQueryTest` would fail with an error of the form: ``` java.lang.AssertionError at org.apache.druid.segment.data.ColumnarLongs$1HistoricalLongColumnSelectorWithNulls.getLong(ColumnarLongs.java:124) at org.apache.druid.segment.filter.Filters$4.matches(Filters.java:467) at org.apache.druid.segment.FilteredOffset.increment(FilteredOffset.java:75) at org.apache.druid.segment.QueryableIndexCursorSequenceBuilder$QueryableIndexCursor.advance(QueryableIndexCursorSequenceBuilder.java:417) at org.apache.druid.query.timeseries.TimeseriesQueryEngine.lambda$processNonVectorized$2(TimeseriesQueryEngine.java:288) ``` The other added tests pass before this PR, just added for additional coverage for funsies. <hr> This PR has: - [x] been self-reviewed. - [x] added unit tests or modified existing tests to cover new code paths. - [ ] added integration tests. - [ ] been tested in a test Druid cluster.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
