(
qcx: &mut QueryContext,
q: &Query<Aug>,
)
| 1794 | } |
| 1795 | |
| 1796 | pub fn plan_nested_query( |
| 1797 | qcx: &mut QueryContext, |
| 1798 | q: &Query<Aug>, |
| 1799 | ) -> Result<(HirRelationExpr, Scope), PlanError> { |
| 1800 | let PlannedQuery { |
| 1801 | mut expr, |
| 1802 | scope, |
| 1803 | order_by, |
| 1804 | limit, |
| 1805 | offset, |
| 1806 | project, |
| 1807 | group_size_hints, |
| 1808 | } = qcx.checked_recur_mut(|qcx| plan_query(qcx, q))?; |
| 1809 | if limit.is_some() |
| 1810 | || !offset |
| 1811 | .clone() |
| 1812 | .try_into_literal_int64() |
| 1813 | .is_ok_and(|offset| offset == 0) |
| 1814 | { |
| 1815 | expr = HirRelationExpr::top_k( |
| 1816 | expr, |
| 1817 | vec![], |
| 1818 | order_by, |
| 1819 | limit, |
| 1820 | offset, |
| 1821 | group_size_hints.limit_input_group_size, |
| 1822 | ); |
| 1823 | } |
| 1824 | Ok((expr.project(project), scope)) |
| 1825 | } |
| 1826 | |
| 1827 | fn plan_set_expr( |
| 1828 | qcx: &mut QueryContext, |
no test coverage detected