somandal commented on issue #10676: URL: https://github.com/apache/pinot/issues/10676#issuecomment-1535039763
The user tried this on the latest master and confirmed that this query works. This issue can be closed. Explain plan shared by user: ``` SET useMultistageEngine=true; EXPLAIN PLAN FOR select DISTINCT(orderID) from foodOrderFact where orderState = 'NEW' and orderID NOT in (select DISTINCT(orderID) from foodOrderFact where orderState != 'NEW') Execution Plan LogicalAggregate(group=[{0}]) LogicalExchange(distribution=[hash[0]]) LogicalAggregate(group=[{0}]) LogicalFilter(condition=[IS NOT TRUE($4)]) LogicalJoin(condition=[=($2, $3)], joinType=[left]) LogicalExchange(distribution=[hash[2]]) LogicalProject(orderID=[$16], orderState=[$17], orderID0=[$16]) LogicalFilter(condition=[=($17, 'NEW')]) LogicalTableScan(table=[[foodOrderFact]]) LogicalExchange(distribution=[hash[0]]) LogicalProject(orderID=[$0], $f1=[true]) LogicalAggregate(group=[{0}]) LogicalExchange(distribution=[hash[0]]) LogicalAggregate(group=[{0}]) LogicalProject(orderID=[$16], orderState=[$17]) LogicalFilter(condition=[<>($17, 'NEW')]) LogicalTableScan(table=[[foodOrderFact]]) ``` -- 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 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