formatting

main
Ziyang Hu 2 years ago
parent 612a6caeb2
commit b72f837b74

@ -11,14 +11,34 @@ use crate::relation::tuple::{CowSlice, CowTuple, OwnTuple, Tuple};
use crate::relation::value::Value; use crate::relation::value::Value;
pub enum MegaTupleIt<'a> { pub enum MegaTupleIt<'a> {
NodeIt { it: IteratorPtr<'a>, tid: u32 }, NodeIt {
EdgeIt { it: IteratorPtr<'a>, tid: u32 }, it: IteratorPtr<'a>,
EdgeKeyOnlyBwdIt { it: IteratorPtr<'a>, tid: u32 }, tid: u32
},
EdgeIt {
it: IteratorPtr<'a>,
tid: u32
},
EdgeKeyOnlyBwdIt {
it: IteratorPtr<'a>,
tid: u32
},
// EdgeBwdIt { it: IteratorPtr<'a>, sess: &'a Session<'a>, tid: u32 }, // EdgeBwdIt { it: IteratorPtr<'a>, sess: &'a Session<'a>, tid: u32 },
// IndexIt {it: ..} // IndexIt {it: ..}
KeySortedWithAssocIt { main: Box<MegaTupleIt<'a>>, associates: Vec<(u32, IteratorPtr<'a>)> }, KeySortedWithAssocIt {
CartesianProdIt { left: Box<MegaTupleIt<'a>>, right: Box<MegaTupleIt<'a>> }, main: Box<MegaTupleIt<'a>>,
MergeJoinIt { left: Box<MegaTupleIt<'a>>, right: Box<MegaTupleIt<'a>>, left_keys: Vec<(TableId, ColId)>, right_keys: Vec<(TableId, ColId)> }, associates: Vec<(u32, IteratorPtr<'a>)>
},
CartesianProdIt {
left: Box<MegaTupleIt<'a>>,
right: Box<MegaTupleIt<'a>>
},
MergeJoinIt {
left: Box<MegaTupleIt<'a>>,
right: Box<MegaTupleIt<'a>>,
left_keys: Vec<(TableId, ColId)>,
right_keys: Vec<(TableId, ColId)>
},
OuterMergeJoinIt { OuterMergeJoinIt {
left: Box<MegaTupleIt<'a>>, left: Box<MegaTupleIt<'a>>,
right: Box<MegaTupleIt<'a>>, right: Box<MegaTupleIt<'a>>,
@ -29,11 +49,27 @@ pub enum MegaTupleIt<'a> {
left_len: (usize, usize), left_len: (usize, usize),
right_len: (usize, usize), right_len: (usize, usize),
}, },
KeyedUnionIt { left: Box<MegaTupleIt<'a>>, right: Box<MegaTupleIt<'a>> }, KeyedUnionIt {
KeyedDifferenceIt { left: Box<MegaTupleIt<'a>>, right: Box<MegaTupleIt<'a>> }, left: Box<MegaTupleIt<'a>>,
FilterIt { it: Box<MegaTupleIt<'a>>, filter: Value<'a> }, right: Box<MegaTupleIt<'a>>
EvalIt { it: Box<MegaTupleIt<'a>>, keys: Vec<Value<'a>>, vals: Vec<Value<'a>>, prefix: u32 }, },
BagsUnionIt { bags: Vec<MegaTupleIt<'a>> }, KeyedDifferenceIt {
left: Box<MegaTupleIt<'a>>,
right: Box<MegaTupleIt<'a>>
},
FilterIt {
it: Box<MegaTupleIt<'a>>,
filter: Value<'a>
},
EvalIt {
it: Box<MegaTupleIt<'a>>,
keys: Vec<Value<'a>>,
vals: Vec<Value<'a>>,
out_prefix: u32
},
BagsUnionIt {
bags: Vec<MegaTupleIt<'a>>
},
} }
impl<'a> MegaTupleIt<'a> { impl<'a> MegaTupleIt<'a> {
@ -97,7 +133,7 @@ impl<'a> MegaTupleIt<'a> {
filter, filter,
}) })
} }
MegaTupleIt::EvalIt { it, keys, vals, prefix } => { MegaTupleIt::EvalIt { it, keys, vals, out_prefix: prefix } => {
Box::new(EvalIterator { Box::new(EvalIterator {
it: it.iter(), it: it.iter(),
keys, keys,

Loading…
Cancel
Save