diff --git a/src/operator/distinct.rs b/src/operator/distinct.rs index c157727c..6367fba4 100644 --- a/src/operator/distinct.rs +++ b/src/operator/distinct.rs @@ -10,14 +10,12 @@ use crate::{ circuit_cache_key, time::NestedTimestamp32, trace::{ord::OrdKeySpine, BatchReader, Builder, Cursor as TraceCursor, Trace}, - NumEntries, }; use size_of::SizeOf; use std::{ borrow::Cow, cmp::Ordering, collections::{BTreeSet, HashMap}, - hash::Hash, marker::PhantomData, ops::{Add, Neg}, }; @@ -35,8 +33,6 @@ where where Z: IndexedZSet + Send, Z::R: ZRingValue, - Z::Key: Ord + Clone + Hash, - Z::Val: Ord + Clone + Hash, { self.circuit() .cache_get_or_insert_with(DistinctId::new(self.origin_node_id().clone()), || { @@ -53,9 +49,7 @@ where /// is more efficient. pub fn distinct_incremental(&self) -> Stream, Z> where - Z: SizeOf + NumEntries + IndexedZSet + Send, - Z::Key: Clone + PartialEq + Ord + Hash, - Z::Val: Clone + Ord + Hash, + Z: IndexedZSet + Send, Z::R: ZRingValue, { self.shard().distinct_incremental_inner().mark_sharded() @@ -63,9 +57,7 @@ where fn distinct_incremental_inner(&self) -> Stream, Z> where - Z: SizeOf + NumEntries + IndexedZSet, - Z::Key: Clone + PartialEq + Ord, - Z::Val: Clone + Ord, + Z: IndexedZSet, Z::R: ZRingValue, { self.circuit() @@ -86,8 +78,7 @@ where // TODO: remove this method. pub fn distinct_incremental_nested(&self) -> Stream, Z> where - Z: SizeOf + NumEntries + Send + ZSet, - Z::Key: Clone + PartialEq + Ord + Hash, + Z: ZSet + Send, Z::R: ZRingValue, { self.shard() @@ -112,9 +103,8 @@ where /// [`Stream::distinct_incremental_nested`]. pub fn distinct_trace(&self) -> Stream, Z> where - Z: NumEntries + ZSet + SizeOf + Send, - Z::Key: Clone + Ord + SizeOf + Hash, - Z::R: ZRingValue + SizeOf, + Z: ZSet + Send, + Z::R: ZRingValue, { self.circuit() .cache_get_or_insert_with(DistinctTraceId::new(self.origin_node_id().clone()), || { @@ -169,8 +159,6 @@ impl UnaryOperator for Distinct where Z: IndexedZSet, Z::R: ZRingValue, - Z::Key: Clone, - Z::Val: Clone, { fn eval(&mut self, input: &Z) -> Z { input.distinct() @@ -220,8 +208,6 @@ where impl BinaryOperator for DistinctIncremental where Z: IndexedZSet, - Z::Key: Clone + PartialEq, - Z::Val: Clone + PartialEq, Z::R: ZRingValue, I: BatchReader, { @@ -330,7 +316,6 @@ where impl DistinctTrace where Z: ZSet, - Z::Key: Clone + Ord + PartialEq, Z::R: ZRingValue, T: BatchReader, { @@ -458,7 +443,6 @@ where impl Operator for DistinctTrace where Z: ZSet, - Z::Key: SizeOf + Clone + Ord + PartialEq, T: BatchReader, { fn name(&self) -> Cow<'static, str> { @@ -503,7 +487,6 @@ where impl BinaryOperator for DistinctTrace where Z: ZSet, - Z::Key: Clone + Ord + PartialEq + SizeOf, Z::R: ZRingValue, T: Trace, { diff --git a/src/operator/time_series/window.rs b/src/operator/time_series/window.rs index 8da1a3eb..7df7605b 100644 --- a/src/operator/time_series/window.rs +++ b/src/operator/time_series/window.rs @@ -8,16 +8,13 @@ use crate::{ }, trace::{cursor::Cursor, ord::OrdZSet, spine_fueled::Spine, Batch, BatchReader}, }; -use size_of::SizeOf; use std::{borrow::Cow, cmp::max, marker::PhantomData}; impl Stream, B> where P: Clone + 'static, - B: IndexedZSet + SizeOf, - B::Key: Ord + SizeOf + Clone, - B::Val: Ord + SizeOf + Clone, - B::R: NegByRef + SizeOf, + B: IndexedZSet, + B::R: NegByRef, { /// Extract a subset of values that fall within a moving window from a /// stream of time-indexed values. @@ -123,9 +120,7 @@ where impl TernaryOperator, B, (B::Key, B::Key), OrdZSet> for Window where B: IndexedZSet, - B::Val: Ord + SizeOf + Clone, - B::Key: Ord + SizeOf + Clone, - B::R: NegByRef + SizeOf, + B::R: NegByRef, { /// * `batch` - input stream containing new time series data points indexed /// by time.