somu-imply commented on code in PR #15020:
URL: https://github.com/apache/druid/pull/15020#discussion_r1332544513
##########
sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java:
##########
@@ -788,6 +790,24 @@ static Pair<DataSource, Filtration> getFiltration(
{
if (!canUseIntervalFiltering(dataSource)) {
return Pair.of(dataSource, toFiltration(filter,
virtualColumnRegistry.getFullRowSignature(), false));
+ } else if (dataSource instanceof UnnestDataSource) {
+ // UnnestDataSource can have another unnest data source
+ // join datasource, filtered data source, etc as base
+ Pair<DataSource, Filtration> pair = getFiltration(
+ ((UnnestDataSource) dataSource).getBase(),
Review Comment:
in the original code before the unnest handling this would appear as
```
datasource = UnnestDS(FilteredDS(foo,timeFilter))
filter = null
```
The presence of a filter would always trigger a filter data source which
consumes the filter. So that flow was not able to handle this without the
special handling for UnnestDataSource which just delegates to its children and
the Filter data source which uses the filter present with it
--
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]