Jackie-Jiang opened a new issue, #16036:
URL: https://github.com/apache/pinot/issues/16036

   Segment level explain node might not be mergable, especially for filtering 
because it might be optimized to nodes with different titles such as 
`FilterAnd`, `FilterFullScan`, `FilterEmpty` etc. based on the stats of the 
segment. Currently `ExplainNodeSimplifier.visitExplained()` is not able to 
handle it properly
   
   After removing the `assert`, I got the following result for this query: 
`SELECT SUM(1) FILTER (WHERE AirlineID = 19393 AND DATE_TRUNC('SECOND', ts) > 
1398816000000) FROM mytable LIMIT 100`
   ```
   Execution Plan
   LogicalSort(fetch=[100])
     PinotLogicalSortExchange(distribution=[hash], collation=[[]], 
isSortOnSender=[false], isSortOnReceiver=[false])
       LogicalProject(EXPR$0=[CASE(=($1, 0), null:BIGINT, $0)])
         PinotLogicalAggregate(group=[{}], agg#0=[$SUM0($0)], 
agg#1=[COUNT($1)], aggType=[FINAL])
           PinotLogicalExchange(distribution=[hash])
             LeafStageCombineOperator(table=[mytable])
               StreamingInstanceResponse
                 CombineAggregate
                   AggregateFiltered(aggregations=[[sum('1'), count(*)]])
                     Transform(expressions=[['1']])
                       Project(columns=[[]])
                         DocIdSet(maxDocs=[10000])
                           FilterAnd
                             FilterSortedIndex(predicate=[$ts$SECOND > 
'1398816000000'], indexLookUp=[sorted_index], operator=[RANGE])
                             FilterFullScan(predicate=[AirlineID = '19393'], 
operator=[EQ])
                   AggregateFiltered(aggregations=[[sum('1'), count(*)]])
                     Transform(expressions=[['1']])
                       Project(columns=[[]])
                         DocIdSet(maxDocs=[20000])
                           FilterFullScan(predicate=[AirlineID = '19393'], 
operator=[EQ])
                   AggregateFiltered(aggregations=[[sum('1'), count(*)]])
                     Transform(expressions=[['1']])
                       Project(columns=[[]])
                         DocIdSet(maxDocs=[10000])
                           FilterFullScan(predicate=[AirlineID = '19393'], 
operator=[EQ])
                   AggregateFiltered(aggregations=[[sum('1'), count(*)]])
                     Transform(expressions=[['1']])
                       Project(columns=[[]])
                         DocIdSet(maxDocs=[20000])
                           FilterEmpty
                   AggregateFiltered(aggregations=[[sum('1'), count(*)]])
                     Transform(expressions=[['1']])
                       Project(columns=[[]])
                         DocIdSet(maxDocs=[10000])
                           FilterEmpty
                   AggregateFiltered(aggregations=[[sum('1'), count(*)]])
                     Transform(expressions=[['1']])
                       Project(columns=[[]])
                         DocIdSet(maxDocs=[10000])
                           FilterFullScan(predicate=[AirlineID = '19393'], 
operator=[EQ])
   ```


-- 
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-unsubscr...@pinot.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to