pub struct SharedDataFusionEngine(pub Arc<DataFusionEngine>);Expand description
A cheaply-cloneable, Arc-wrapped DataFusionEngine that implements
rhei_core::OlapEngine.
All method calls delegate to the inner engine. Cloning a
SharedDataFusionEngine only increments the reference count — the
underlying engine (and its table store) is shared.
Use SharedDataFusionEngine::new to construct from a
DataFusionEngine, or access the inner engine through the public Deref
impl or the 0 field.
Tuple Fields§
§0: Arc<DataFusionEngine>Implementations§
Sourcepub fn new(engine: DataFusionEngine) -> Self
pub fn new(engine: DataFusionEngine) -> Self
Wrap a DataFusionEngine in an Arc so it can be shared across tasks.
Methods from Deref<Target = DataFusionEngine>§
Sourcepub fn storage_mode(&self) -> &StorageMode
pub fn storage_mode(&self) -> &StorageMode
Returns the storage mode of this engine.
Trait Implementations§
Source§fn clone(&self) -> SharedDataFusionEngine
fn clone(&self) -> SharedDataFusionEngine
Returns a duplicate 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§type Error = DfOlapError
type Error = DfOlapError
Engine-specific error type returned by all fallible methods.
Source§async fn query(&self, sql: &str) -> Result<Vec<RecordBatch>, Self::Error>
async fn query(&self, sql: &str) -> Result<Vec<RecordBatch>, Self::Error>
Execute an analytical SQL query and return results as Arrow
RecordBatches buffered in memory. Read moreSource§async fn query_stream(
&self,
sql: &str,
) -> Result<RecordBatchBoxStream, Self::Error>
async fn query_stream( &self, sql: &str, ) -> Result<RecordBatchBoxStream, Self::Error>
Execute a SQL query and return a lazy
RecordBatchBoxStream. Read moreSource§async fn execute(&self, sql: &str) -> Result<u64, Self::Error>
async fn execute(&self, sql: &str) -> Result<u64, Self::Error>
Execute a DDL or DML statement without returning rows. Read more
Source§async fn load_arrow(
&self,
table: &str,
batches: &[RecordBatch],
) -> Result<u64, Self::Error>
async fn load_arrow( &self, table: &str, batches: &[RecordBatch], ) -> Result<u64, Self::Error>
Source§async fn create_table(
&self,
table_name: &str,
schema: &SchemaRef,
primary_key: &[String],
) -> Result<(), Self::Error>
async fn create_table( &self, table_name: &str, schema: &SchemaRef, primary_key: &[String], ) -> Result<(), Self::Error>
Create a table from an Arrow schema with an optional primary key. Read more
Source§async fn add_column(
&self,
table_name: &str,
column_name: &str,
data_type: &DataType,
) -> Result<(), Self::Error>
async fn add_column( &self, table_name: &str, column_name: &str, data_type: &DataType, ) -> Result<(), Self::Error>
Add a nullable column to an existing table. Read more
Source§async fn drop_column(
&self,
table_name: &str,
column_name: &str,
) -> Result<(), Self::Error>
async fn drop_column( &self, table_name: &str, column_name: &str, ) -> Result<(), Self::Error>
Remove a column from an existing table. Read more
Source§fn supports_transactions(&self) -> bool
fn supports_transactions(&self) -> bool
Auto Trait Implementations§
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