Extend in-operator optimziation ORDER BY support
What does this MR do and why?
This MR extends the in-operator optimization to allow sorting by calculated SQL expressions. The change is needed by the #345589 (closed) issue, where we need to sort items by the following expression (duration):
EXTRACT(EPOCH FROM analytics_cycle_analytics_issue_stage_events.end_event_timestamp - analytics_cycle_analytics_issue_stage_events.start_event_timestamp)
The MR includes documentation with a usage example.
The change is not user-facing, the new queries for #345589 (closed) will be implemented in a separate MR.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Adam Hegyi