pub struct DeltaDataChecker { /* private fields */ }
Expand description
Responsible for checking batches of data conform to table’s invariants, constraints and nullability.
Implementations§
Source§impl DeltaDataChecker
impl DeltaDataChecker
Sourcepub fn new_with_invariants(invariants: Vec<Invariant>) -> Self
pub fn new_with_invariants(invariants: Vec<Invariant>) -> Self
Create a new DeltaDataChecker with a specified set of invariants
Sourcepub fn new_with_constraints(constraints: Vec<Constraint>) -> Self
pub fn new_with_constraints(constraints: Vec<Constraint>) -> Self
Create a new DeltaDataChecker with a specified set of constraints
Sourcepub fn with_session_context(self, context: SessionContext) -> Self
pub fn with_session_context(self, context: SessionContext) -> Self
Specify the Datafusion context
Sourcepub fn with_extra_constraints(self, constraints: Vec<Constraint>) -> Self
pub fn with_extra_constraints(self, constraints: Vec<Constraint>) -> Self
Add the specified set of constraints to the current DeltaDataChecker’s constraints
Sourcepub fn new(snapshot: &DeltaTableState) -> Self
pub fn new(snapshot: &DeltaTableState) -> Self
Create a new DeltaDataChecker
Sourcepub async fn check_batch(
&self,
record_batch: &RecordBatch,
) -> Result<(), DeltaTableError>
pub async fn check_batch( &self, record_batch: &RecordBatch, ) -> Result<(), DeltaTableError>
Check that a record batch conforms to table’s invariants.
If it does not, it will return DeltaTableError::InvalidData with a list of values that violated each invariant.
Trait Implementations§
Source§impl Clone for DeltaDataChecker
impl Clone for DeltaDataChecker
Source§fn clone(&self) -> DeltaDataChecker
fn clone(&self) -> DeltaDataChecker
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for DeltaDataChecker
impl Default for DeltaDataChecker
Source§fn default() -> DeltaDataChecker
fn default() -> DeltaDataChecker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DeltaDataChecker
impl !RefUnwindSafe for DeltaDataChecker
impl Send for DeltaDataChecker
impl Sync for DeltaDataChecker
impl Unpin for DeltaDataChecker
impl !UnwindSafe for DeltaDataChecker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more