You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "somu-imply (via GitHub)" <gi...@apache.org> on 2023/03/14 05:40:23 UTC

[GitHub] [druid] somu-imply commented on pull request #13922: Refactoring and bug fixes on top of unnest. The allowList now is not passed …

somu-imply commented on PR #13922:
URL: https://github.com/apache/druid/pull/13922#issuecomment-1467398792

   A query like `SELECT d3 FROM druid.numfoo, UNNEST(MV_TO_ARRAY(dim3)) as unnested (d3) where d3='b'` as Calcite was adding an additional level of project before the filter causing our filter transpose rules to not fire. The calcite plan was
   ```
   126:LogicalProject(d3=[$17])
     124:LogicalCorrelate(subset=[rel#125:Subset#6.NONE.[]], correlation=[$cor0], joinType=[inner], requiredColumns=[{3}])
       8:LogicalTableScan(subset=[rel#114:Subset#0.NONE.[]], table=[[druid, numfoo]])
       122:LogicalProject(subset=[rel#123:Subset#5.NONE.[]], d3=[CAST('d':VARCHAR):VARCHAR])
         120:LogicalFilter(subset=[rel#121:Subset#4.NONE.[]], condition=[=($0, 'd')])
           118:Uncollect(subset=[rel#119:Subset#3.NONE.[]])
             116:LogicalProject(subset=[rel#117:Subset#2.NONE.[]], EXPR$0=[MV_TO_ARRAY($cor0.dim3)])
               9:LogicalValues(subset=[rel#115:Subset#1.NONE.[0]], tuples=[[{ 0 }]])
   ```
   Added an additional plan that removes this Project step (which does a CAST). Additional tests introduced for selector filters on STRING and NUMERIC values after unnest


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org