Typecheck an `AggregateExpr`
(
&self,
expr: &'a AggregateExpr,
source: &'a MirRelationExpr,
column_types: &[ReprColumnType],
)
| 1565 | |
| 1566 | /// Typecheck an `AggregateExpr` |
| 1567 | pub fn typecheck_aggregate<'a>( |
| 1568 | &self, |
| 1569 | expr: &'a AggregateExpr, |
| 1570 | source: &'a MirRelationExpr, |
| 1571 | column_types: &[ReprColumnType], |
| 1572 | ) -> Result<ReprColumnType, TypeError<'a>> { |
| 1573 | self.checked_recur(|tc| { |
| 1574 | let t_in = tc.typecheck_scalar(&expr.expr, source, column_types)?; |
| 1575 | |
| 1576 | // TODO check that t_in is actually acceptable for `func` |
| 1577 | |
| 1578 | Ok(expr.func.output_type(t_in)) |
| 1579 | }) |
| 1580 | } |
| 1581 | } |
| 1582 | |
| 1583 | /// Detailed type error logging as a warning, with failures in CI and a logged error in production |
no test coverage detected