pub struct ParquetDataCatalog { /* private fields */ }
Implementations§
Source§impl ParquetDataCatalog
impl ParquetDataCatalog
pub fn new(base_path: PathBuf, batch_size: Option<usize>) -> Self
pub fn write_data_enum( &self, data: Vec<Data>, write_mode: Option<ParquetWriteMode>, )
pub fn write_to_parquet<T>(
&self,
data: Vec<T>,
path: Option<PathBuf>,
compression: Option<Compression>,
max_row_group_size: Option<usize>,
write_mode: Option<ParquetWriteMode>,
) -> Result<PathBuf>where
T: GetTsInit + EncodeToRecordBatch + CatalogPathPrefix,
pub fn data_to_record_batches<T>(
&self,
data: Vec<T>,
) -> Result<Vec<RecordBatch>>where
T: GetTsInit + EncodeToRecordBatch,
pub fn write_to_json<T>(
&self,
data: Vec<T>,
path: Option<PathBuf>,
write_metadata: bool,
) -> Result<PathBuf>where
T: GetTsInit + Serialize + CatalogPathPrefix + EncodeToRecordBatch,
pub fn consolidate_data( &self, type_name: &str, instrument_id: Option<String>, ) -> Result<()>
pub fn consolidate_catalog(&self) -> Result<()>
pub fn find_leaf_data_directories(&self) -> Result<Vec<PathBuf>>
Sourcepub fn query_file<T>(
&mut self,
path: PathBuf,
start: Option<UnixNanos>,
end: Option<UnixNanos>,
where_clause: Option<&str>,
) -> Result<QueryResult>where
T: DecodeDataFromRecordBatch + CatalogPathPrefix,
pub fn query_file<T>(
&mut self,
path: PathBuf,
start: Option<UnixNanos>,
end: Option<UnixNanos>,
where_clause: Option<&str>,
) -> Result<QueryResult>where
T: DecodeDataFromRecordBatch + CatalogPathPrefix,
Query data loaded in the catalog
Sourcepub fn query_directory<T>(
&mut self,
instrument_ids: Vec<String>,
start: Option<UnixNanos>,
end: Option<UnixNanos>,
where_clause: Option<&str>,
) -> Result<QueryResult>where
T: DecodeDataFromRecordBatch + CatalogPathPrefix,
pub fn query_directory<T>(
&mut self,
instrument_ids: Vec<String>,
start: Option<UnixNanos>,
end: Option<UnixNanos>,
where_clause: Option<&str>,
) -> Result<QueryResult>where
T: DecodeDataFromRecordBatch + CatalogPathPrefix,
Query data loaded in the catalog
pub fn query_timestamp_bound( &self, data_cls: &str, instrument_id: Option<String>, is_last: Option<bool>, ) -> Result<Option<i64>>
pub fn query_parquet_files( &self, type_name: &str, instrument_id: Option<String>, ) -> Result<Vec<PathBuf>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParquetDataCatalog
impl !RefUnwindSafe for ParquetDataCatalog
impl Send for ParquetDataCatalog
impl Sync for ParquetDataCatalog
impl Unpin for ParquetDataCatalog
impl !UnwindSafe for ParquetDataCatalog
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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