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/07 23:04:47 UTC

[GitHub] [druid] somu-imply commented on pull request #13892: Various changes and fixes to UNNEST.

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

   I think the reason is that there is an additional level of LogicalProject between Correlate and LogicalFilter in the query where `SELECT d3 FROM (select * from druid.numfoo where dim2='a'), UNNEST(MV_TO_ARRAY(dim3)) as unnested (d3)` it plans to 
   ```
   136:LogicalProject(d3=[$17])
     134:LogicalCorrelate(subset=[rel#135:Subset#7.NONE.[]], correlation=[$cor0], joinType=[inner], requiredColumns=[{3}])
       125:LogicalProject(subset=[rel#126:Subset#2.NONE.[]], __time=[$0], dim1=[$1], dim2=[CAST('a':VARCHAR):VARCHAR], dim3=[$3], dim4=[$4], dim5=[$5], dim6=[$6], d1=[$7], d2=[$8], f1=[$9], f2=[$10], l1=[$11], l2=[$12], cnt=[$13], m1=[$14], m2=[$15], unique_dim1=[$16])
         123:LogicalFilter(subset=[rel#124:Subset#1.NONE.[]], condition=[=($2, 'a')])
           9:LogicalTableScan(subset=[rel#122:Subset#0.NONE.[]], table=[[druid, numfoo]])
       130:Uncollect(subset=[rel#131:Subset#5.NONE.[]])
         128:LogicalProject(subset=[rel#129:Subset#4.NONE.[]], EXPR$0=[MV_TO_ARRAY($cor0.dim3)])
           12:LogicalValues(subset=[rel#127:Subset#3.NONE.[0]], tuples=[[{ 0 }]])
   ```
   
   which does not match the CorrelateFilterTranspose rule (L or R). We might need to address that but can be done with a later PR as well


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