siddharthteotia commented on PR #9078:
URL: https://github.com/apache/pinot/pull/9078#issuecomment-1192039642

   So there are broadly 2 categories of MV specific order by expressions for 
selection order by queries 
   
   - SELECT ..... ORDER BY <first expression is MV identifier expression> , 0 
or more expressions could be SV or MV
   - SELECT ..... ORDER BY <first expression is MV transform expression>, 0 or 
more expressions could be SV or MV
   
   I agree that changing min-max operator is too late and the problem can be 
solved / detected sooner. 
   
   I also agree that purist way of solving this is to detect the presence of 
**any** MV expression in the ORDER BY expressions like in 
`SelectionOrderByOperator` constructor and throw exception. I think it is a 
clean solution.
   
   However, currently the engine lets 2nd category of queries go through by 
ignoring the MV expression in the ORDER BY list. The 1st category fails later 
during execution with not a meaningful error in the min-max operator when 
trying to execute first expression.
   
   Making changes to constructor of `SelectionOrderByOperator` will fail both 
categories (which is good ) but I have no idea if our production has any 
queries from 2nd category  so there is a potential of breaking prod queries (if 
any) not just for us but even for OSS customers / users. There is no way for me 
to find percentage of such queries from our prod logs
   
   To continue running 2nd category queries (like today), we decided not to 
make the operator change and instead fail it during server planning by special 
casing for category 1 queries.
   
   Any thoughts on the risk to do the clean/pure solution ? If there is such 
query in production, we may have to rollback or force the client app to change 
queries. cc @somandal @Jackie-Jiang  @walterddr 


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

Reply via email to