LakshSingla commented on pull request #11809:
URL: https://github.com/apache/druid/pull/11809#issuecomment-953768873


   The format of the Subquery ID has been changed in the later commits. 
Subquery ID is divided into 3 parts separated by `-`. (not all parts maybe 
present for a given subquery).
   1. First part indicates the sequence in which the subquery is run (in the 
collection of subqueries generated by the master query).
   2. The second part indicates the nesting level of that subquery datasource 
in the structure of original datasource. The nesting structure represents a 
hierarchy delimited by `.`.
   3. The third part is present if the subqueries are generated as a response 
to a union query, and depicts the original datasource and it's sequence number 
in the union subqueries.
   
   Example queries: 
   ```
   GroupByQuery{                                           
     dataSource='JoinDataSource{                         
       left=UnionDataSource{dataSources=[                  
         foo,                                            
         bar]},                                      
       right=GroupByQuery{                     
         dataSource='UnionDataSource{dataSources=[       
           foo,                                            
           bar]}                                         
     }
   }     
   ```
   This will generate 4 subqueries. The one generated due to inlining of inner 
`GroupByQuery` would have sequence number as 1 (first of the subqueries which 
is run), the nesting level as `1.2` (nesting level of the subquery inside the 
parent datasource), and the third part a foo.1 and bar.2 respectively. 
Therefore the subqueries thus generated would have ids: `1-1.2-foo.1` and 
`1-1.2-bar.2`
   The original query run would have the subquery ids of `foo.1` and `bar.2` 
(denoting the union datasources) since they don't contain the first and the 
second part respectively. 


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