somu-imply commented on PR #14587:
URL: https://github.com/apache/druid/pull/14587#issuecomment-1639034989
There are 2 cases:
1. Consider the query ```
select * from foo, UNNEST(dim3) as u(d3) where d3 IN (a,b) or m1 < 10
```
Here since d3 can be mapped directly to an input column dim3, the filter can
be reconstructed as a pre-filter with dim3 IN (a,b) or m1<10 and pushed to the
base cursor.
2. Consider the query
```
select * from foo, UNNEST(ARRAY[dim1,dim2]) as u(d12) where d12 IN (a,b) or
m1 < 10
```
since the filter outside contains an OR filter and `d12` has no direct
match to an input column there should be no pre-filters and the entire filter
should be just used as a post-filter. In the current code, this needs to be
accounted for and a test case needs to be added for the same. Currently, for
the failing query in CI, this does not seem to be the case and returns
incorrect results
```
filterSplitter.filtersForPostUnnestCursor = {ArrayList@10853} size = 1
0 = {OrFilter@8617} "(m1 as numeric < 2 || j0.unnest IN (a, aa))"
filterSplitter.filtersPushedDownToBaseCursor = {ArrayList@10854} size = 1
0 = {OrFilter@10852} "(m1 as numeric < 2)"
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]