fix: regression that makes order by with nulls order not work alongside limits

This commit is contained in:
Laurence Isla
2025-06-02 14:17:35 -05:00
parent dee7d6f39c
commit c413833ec8
3 changed files with 14 additions and 2 deletions
+2 -2
View File
@@ -53,8 +53,8 @@ readPlanToQuery node@(Node ReadPlan{select,from=mainQi,fromAlias,where_=logicFor
(if null logicForest && null relJoinConds
then mempty
else " WHERE " <> intercalateSnippet " AND " (map (pgFmtLogicTree qi) logicForest ++ map pgFmtJoinCondition relJoinConds)) <> " " <>
groupF qi select relSelect <>
orderF qi order <>
groupF qi select relSelect <> " " <>
orderF qi order <> " " <>
limitOffsetF readRange
where
fromFrag = fromF relToParent mainQi fromAlias