gianm commented on PR #13892:
URL: https://github.com/apache/druid/pull/13892#issuecomment-1461826876

   > But these 2 queries have different plans, the selector filter inside the 
table for the first query below plans as an unnest over a QueryDataSource while 
the second one is an Unnest over a TableDataSource
   
   Looks like you're right about the extra Project being the reason. It 
prevents the filter from being pulled out since it's in the way. One approach 
we could take here is make a rule that recognizes the situation, and pulls the 
Project and Filter both out.
   
   Thanks for taking a look. I pushed up fixes to the merge conflicts and the 
one test you pointed out. I also simplified DruidUnnestRel— in the latest patch 
it only contains a single RexNode. Finally I also expanded the filter-rewriting 
logic in UnnestStorageAdapter so it rewrites certain filters to use the input 
column of the unnest rather than the output column. It's limited to string 
types and non-expression filters, but it's s start. This piece could be 
improved in the future.


-- 
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]

Reply via email to