cube icon indicating copy to clipboard operation
cube copied to clipboard

fix(cubesql): Don't push down Sort to Projection with Aggregate input

Open MazterQyou opened this issue 1 year ago • 1 comments

Check List

  • [x] Tests has been run in packages where changes made if available
  • [x] Linter has been run for changed code
  • [x] Tests for the changes have been added if not covered yet
  • [x] Docs have been added / updated if required

Description of Changes Made

This PR changes SortPushDown optimizer behavior to avoid pushing Sort down to Projection if its input is an Aggregate. This fixes and issue with ORDER BY not being realiased correctly with SQL push down. Related test is included.

MazterQyou avatar Mar 26 '24 21:03 MazterQyou

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 61.86%. Comparing base (fc79188) to head (f058980).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8003   +/-   ##
=======================================
  Coverage   61.85%   61.86%           
=======================================
  Files         351      351           
  Lines       48622    48623    +1     
  Branches     5258     5258           
=======================================
+ Hits        30077    30079    +2     
+ Misses      18346    18345    -1     
  Partials      199      199           
Flag Coverage Δ
cube-backend 47.91% <ø> (ø)
cubesql 72.47% <100.00%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 26 '24 21:03 codecov[bot]