Closed svenklemm closed 1 day ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 81.77%. Comparing base (
59f50f2
) to head (c3417a4
). Report is 233 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
When querying compressed data we determine whether the requested ORDER can be applied to the underlying query on the compressed data itself. This happens twice. The first time we decide whether we can push down the sort and then we do a recheck when we setup the sort metadata. Unfortunately those two checks did not agree. The initial check concluded it is possible but the recheck disagreed. This was due to a bug when checking the query properties we mixed up the attnos and used attnos from uncompressed chunk and compressed chunk in the same bitmapset. If a segmentby column with equality constraint was present in the WHERE clause whose attno was identical to a compressed attno of a different column that was part of the ORDER BY the recheck would fail.
This patch removes the recheck and relies on the initial assesment when building sort metadata.