pub fn typ(&self) -> RelationType {
        let mut type_stack = Vec::new();
        self.visit_pre_post(
            &mut |e: &MirRelationExpr| -> Option<Vec<&MirRelationExpr>> {
                if let MirRelationExpr::Let { body, .. } = &e {
                    // Do not traverse the value sub-graph, since it's not relevant for
                    // determing the relation type of Let operators.
                    Some(vec![&*body])
                } else {
                    None
                }
            },
            &mut |e: &MirRelationExpr| {
                if let MirRelationExpr::Let { .. } = &e {
                    let body_typ = type_stack.pop().unwrap();
                    // Insert a dummy relation type for the value, since `typ_with_input_types`
                    // won't look at it, but expects the relation type of the body to be second.
                    type_stack.push(RelationType::empty());
                    type_stack.push(body_typ);
                }
                let num_inputs = e.num_inputs();
                let relation_type =
                    e.typ_with_input_types(&type_stack[type_stack.len() - num_inputs..]);
                type_stack.truncate(type_stack.len() - num_inputs);
                type_stack.push(relation_type);
            },
        );
        assert_eq!(type_stack.len(), 1);
        type_stack.pop().unwrap()
    }
/// Reports the schema of the relation.
///
/// This method determines the type through recursive traversal of the
/// relation expression, drawing from the types of base collections.
/// As such, this is not an especially cheap method, and should be used
/// judiciously.
///
/// The relation type is computed incrementally with a recursive post-order
/// traversal, that accumulates the input types for the relations yet to be
/// visited in `type_stack`.
Reports the schema of the relation.
This method determines the type through recursive traversal of the
relation expression, drawing from the types of base collections.
As such, this is not an especially cheap method, and should be used
judiciously.

The relation type is computed incrementally with a recursive post-order
traversal, that accumulates the input types for the relations yet to be
visited in `type_stack`.
Reports the schema of the relation . This method determines the type through recursive traversal of the relation expression drawing from the types of base collections . As such this is not an especially cheap method and should be used judiciously . The relation type is computed incrementally with a recursive post - order traversal that accumulates the input types for the relations yet to be visited in ` type_stack ` .
pub fn typ(&self) -> RelationType {
        let mut type_stack = Vec::new();
        self.visit_pre_post(
            &mut |e: &MirRelationExpr| -> Option<Vec<&MirRelationExpr>> {
                if let MirRelationExpr::Let { body, .. } = &e {
                    // Do not traverse the value sub-graph, since it's not relevant for
                    // determing the relation type of Let operators.
                    Some(vec![&*body])
                } else {
                    None
                }
            },
            &mut |e: &MirRelationExpr| {
                if let MirRelationExpr::Let { .. } = &e {
                    let body_typ = type_stack.pop().unwrap();
                    // Insert a dummy relation type for the value, since `typ_with_input_types`
                    // won't look at it, but expects the relation type of the body to be second.
                    type_stack.push(RelationType::empty());
                    type_stack.push(body_typ);
                }
                let num_inputs = e.num_inputs();
                let relation_type =
                    e.typ_with_input_types(&type_stack[type_stack.len() - num_inputs..]);
                type_stack.truncate(type_stack.len() - num_inputs);
                type_stack.push(relation_type);
            },
        );
        assert_eq!(type_stack.len(), 1);
        type_stack.pop().unwrap()
    }
pub fn typ ( & self ) -> RelationType { let mut type_stack = Vec :: new ( ) ; self . visit_pre_post ( & mut | e : & MirRelationExpr | -> Option < Vec < & MirRelationExpr > > { if let MirRelationExpr :: Let { body , .. } = & e { // Do not traverse the value sub-graph, since it's not relevant for // determing the relation type of Let operators. Some ( vec ! [ body ] ) } else { None } } , & mut | e : & MirRelationExpr | { if let MirRelationExpr :: Let { .. } = & e { let body_typ = type_stack . pop ( ) . unwrap ( ) ; // Insert a dummy relation type for the value, since `typ_with_input_types` // won't look at it, but expects the relation type of the body to be second. type_stack . push ( RelationType :: empty ( ) ) ; type_stack . push ( body_typ ) ; } let num_inputs = e . num_inputs ( ) ; let relation_type = e . typ_with_input_types ( & type_stack [ type_stack . len ( ) - num_inputs .. ] ) ; type_stack . truncate ( type_stack . len ( ) - num_inputs ) ; type_stack . push ( relation_type ) ; } , ) ; assert_eq ! ( type_stack len ( ) 1 ) ; type_stack . pop ( ) . unwrap ( ) }
Reports the schema of the relation.
Reports the schema of the relation .
&self
&self