Skip to content

Extend in-operator optimziation ORDER BY support

Adam Hegyi requested to merge in-optimization-with-sql-expressions into master

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.

Edited by Adam Hegyi

Merge request reports

Loading