pub fn constant_diff(rows: Vec<(Vec<Datum>, Diff)>, typ: RelationType) -> Self {
        for (row, _diff) in &rows {
            for (datum, column_typ) in row.iter().zip(typ.column_types.iter()) {
                assert!(
                    datum.is_instance_of(column_typ),
                    "Expected datum of type {:?}, got value {:?}",
                    column_typ,
                    datum
                );
            }
        }
        let rows = Ok(rows
            .into_iter()
            .map(move |(row, diff)| (Row::pack_slice(&row), diff))
            .collect());
        MirRelationExpr::Constant { rows, typ }
    }
/// Constructs a constant collection from specific rows and schema, where
/// each row can have an arbitrary multiplicity.
Constructs a constant collection from specific rows and schema, where
each row can have an arbitrary multiplicity.
Constructs a constant collection from specific rows and schema where each row can have an arbitrary multiplicity .
pub fn constant_diff(rows: Vec<(Vec<Datum>, Diff)>, typ: RelationType) -> Self {
        for (row, _diff) in &rows {
            for (datum, column_typ) in row.iter().zip(typ.column_types.iter()) {
                assert!(
                    datum.is_instance_of(column_typ),
                    "Expected datum of type {:?}, got value {:?}",
                    column_typ,
                    datum
                );
            }
        }
        let rows = Ok(rows
            .into_iter()
            .map(move |(row, diff)| (Row::pack_slice(&row), diff))
            .collect());
        MirRelationExpr::Constant { rows, typ }
    }
pub fn constant_diff ( rows : Vec < ( Vec < Datum > , Diff ) > , typ : RelationType ) -> Self { for ( row , _diff ) in & rows { for ( datum , column_typ ) in row . iter ( ) . zip ( typ . column_types . iter ( ) ) { assert ! ( datum is_instance_of ( column_typ ) " " column_typ datum ) ; } } let rows = Ok ( rows . into_iter ( ) . map ( move | ( row , diff ) | ( Row :: pack_slice ( & row ) , diff ) ) . collect ( ) ) ; MirRelationExpr :: Constant { rows , typ } }
Constructs a constant collection from specific rows and schema, where
each row can have an arbitrary multiplicity.
Constructs a constant collection from specific rows and schema where each row can have an arbitrary multiplicity .
rows
Vec<(Vec<Datum>, Diff)>
typ
RelationType
rows
Vec<(Vec<Datum>, Diff)>
typ
RelationType