Add new 'true' filter which always returns true.#5711
Conversation
| @Override | ||
| public <T> T getBitmapResult(BitmapIndexSelector selector, BitmapResultFactory<T> bitmapResultFactory) | ||
| { | ||
| return null; |
There was a problem hiding this comment.
Hm, maybe this should return bitmapResultFactory.wrapAllTrue(Filters.allTrue(selector)); and return true for supportsBitmapIndex.
As-is, TrueFilter shouldn't be returning true for supportsSelectivityEstimation since it doesn't support bitmap indexes, but not supporting bitmap indexes would potentially interfere with use of bitmap indexes for other subfilters when an And/Or filter contains a TrueFilter (See makeCursors() in QueryableIndexStorageAdapter and getExecutionPlan() in AutoStrategy).
|
Hi @scrawfor, are you still interested in contributing this patch? |
|
@jon-wei Hey Jonathan, I'm still planning on it. Just haven't had the time yet. I'll try to loop back around next week. |
| public class DimFilterUtils | ||
| { | ||
| static final byte NOOP_CACHE_ID = -0x4; | ||
| static final byte TRUE_CACHE_ID = -0x5; |
There was a problem hiding this comment.
This should be added after EXPRESSION_CACHE_ID, not here, with value 0xF
|
Latest version should fix both comments. |
|
Since this replaces the 'noop' filter, would you rather me remove that here, or open another PR? |
|
@scrawfor Let's go ahead and remove that in this PR |
|
@jon-wei No-Op removed. |
|
@leventov Did you have any more comments on this PR? |
|
@jon-wei I didn't intend to review this PR fully. My one comment is addressed. |
Introduces a new "always true" filter instead of exposing the noop filter in PR #5597