somu-imply commented on PR #15020: URL: https://github.com/apache/druid/pull/15020#issuecomment-1734188630
A filteredDS is created only inside the rel for Unnest, ensuring it only grabs the outermost filter and, if possible, pushes it down inside the data source. So a chain of Filter->Unnest->Filter is typically impossible when the query is done through SQL. Also, Calcite has filter reduction rules that push filters deep into base data sources for better query planning. Hence the case that can be seen is a bunch of unnests followed by a terminal filteredDS like Unnest->Unnest->FilteredDS. I have UTs resembling the same. A base table with a chain of filters is synonymous with a filteredDS. In case there are filters present in the getFiltration call we still update the interval by: 1) creating a filtration from the filteredDS's filter and 2) Updating the interval of the outer filter with the intervals in step 1. I'll merge the updated master into this branch to ensure that the tests pass correctly after this change. -- 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]
