pub struct MultiSourceValidator { /* private fields */ }Expand description
Multi-source validation engine for cross-table data validation.
This engine manages multiple data sources and provides efficient validation across heterogeneous datasets with optimized query execution and caching.
Implementations§
Source§impl MultiSourceValidator
impl MultiSourceValidator
Sourcepub fn with_context(ctx: SessionContext) -> Self
pub fn with_context(ctx: SessionContext) -> Self
Create a new multi-source validator with a custom session context.
Sourcepub fn with_telemetry(self, telemetry: Arc<TermTelemetry>) -> Self
pub fn with_telemetry(self, telemetry: Arc<TermTelemetry>) -> Self
Set telemetry for observability.
Sourcepub fn with_caching(self, enable: bool) -> Self
pub fn with_caching(self, enable: bool) -> Self
Enable or disable query result caching.
Sourcepub fn with_max_cache_size(self, size_bytes: usize) -> Self
pub fn with_max_cache_size(self, size_bytes: usize) -> Self
Set maximum cache size in bytes.
Sourcepub async fn add_source<S: DataSource + 'static>(
&mut self,
name: impl Into<String>,
source: S,
) -> Result<()>
pub async fn add_source<S: DataSource + 'static>( &mut self, name: impl Into<String>, source: S, ) -> Result<()>
Sourcepub fn context(&self) -> &SessionContext
pub fn context(&self) -> &SessionContext
Get the DataFusion session context.
This provides direct access to the underlying context for advanced use cases.
Sourcepub fn get_source(&self, name: &str) -> Option<&Arc<dyn DataSource>>
pub fn get_source(&self, name: &str) -> Option<&Arc<dyn DataSource>>
Get a registered data source by name.
Sourcepub fn list_sources(&self) -> Vec<String>
pub fn list_sources(&self) -> Vec<String>
List all registered data sources.
Sourcepub async fn run_suite(
&self,
suite: &ValidationSuite,
) -> Result<ValidationResult>
pub async fn run_suite( &self, suite: &ValidationSuite, ) -> Result<ValidationResult>
Sourcepub async fn execute_query(&mut self, sql: &str) -> Result<Vec<RecordBatch>>
pub async fn execute_query(&mut self, sql: &str) -> Result<Vec<RecordBatch>>
Execute a SQL query with optional caching.
This method is used internally by constraints for performance optimization.
Sourcepub fn cache_stats(&self) -> CacheStats
pub fn cache_stats(&self) -> CacheStats
Get cache statistics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MultiSourceValidator
impl !RefUnwindSafe for MultiSourceValidator
impl Send for MultiSourceValidator
impl Sync for MultiSourceValidator
impl Unpin for MultiSourceValidator
impl !UnwindSafe for MultiSourceValidator
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> 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