pub trait ParquetFrame {
// Required methods
fn new(
storage_settings: &ObjectStorageSettings,
) -> Result<Self, DataFrameError>
where Self: Sized;
fn get_dataframe<'life0, 'async_trait>(
&'life0 self,
records: ServerRecords,
) -> Pin<Box<dyn Future<Output = Result<DataFrame, DataFrameError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn storage_root(&self) -> String;
fn storage_type(&self) -> StorageType;
fn get_session_context(&self) -> Result<SessionContext, DataFrameError>;
fn table_name(&self) -> String;
fn get_binned_sql(
&self,
bin: &f64,
start_time: &DateTime<Utc>,
end_time: &DateTime<Utc>,
space: &str,
name: &str,
version: &str,
) -> String;
// Provided methods
fn write_parquet<'life0, 'life1, 'async_trait>(
&'life0 self,
rpath: &'life1 str,
records: ServerRecords,
) -> Pin<Box<dyn Future<Output = Result<(), DataFrameError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn register_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
table_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SessionContext, DataFrameError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn get_binned_metrics<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>(
&'life0 self,
path: &'life1 str,
bin: &'life2 f64,
start_time: &'life3 DateTime<Utc>,
end_time: &'life4 DateTime<Utc>,
space: &'life5 str,
name: &'life6 str,
version: &'life7 str,
) -> Pin<Box<dyn Future<Output = Result<DataFrame, DataFrameError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait { ... }
}
Required Methods§
fn new(storage_settings: &ObjectStorageSettings) -> Result<Self, DataFrameError>where
Self: Sized,
fn get_dataframe<'life0, 'async_trait>(
&'life0 self,
records: ServerRecords,
) -> Pin<Box<dyn Future<Output = Result<DataFrame, DataFrameError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn storage_root(&self) -> String
fn storage_root(&self) -> String
Get the storage root path
fn storage_type(&self) -> StorageType
fn get_session_context(&self) -> Result<SessionContext, DataFrameError>
fn table_name(&self) -> String
fn get_binned_sql( &self, bin: &f64, start_time: &DateTime<Utc>, end_time: &DateTime<Utc>, space: &str, name: &str, version: &str, ) -> String
Provided Methods§
Sourcefn write_parquet<'life0, 'life1, 'async_trait>(
&'life0 self,
rpath: &'life1 str,
records: ServerRecords,
) -> Pin<Box<dyn Future<Output = Result<(), DataFrameError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_parquet<'life0, 'life1, 'async_trait>(
&'life0 self,
rpath: &'life1 str,
records: ServerRecords,
) -> Pin<Box<dyn Future<Output = Result<(), DataFrameError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Write the records to a parquet file at the given path.
§Arguments
rpath
- The path to write the parquet file to. (This path should exclude root path)records
- The records to write to the parquet file.
Sourcefn register_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
table_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SessionContext, DataFrameError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn register_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
table_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SessionContext, DataFrameError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Load storage files into parquet table for querying
§Arguments
path
- The path to the parquet file (this path should exclude root path)table_name
- The name of the table to register
Sourcefn get_binned_metrics<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>(
&'life0 self,
path: &'life1 str,
bin: &'life2 f64,
start_time: &'life3 DateTime<Utc>,
end_time: &'life4 DateTime<Utc>,
space: &'life5 str,
name: &'life6 str,
version: &'life7 str,
) -> Pin<Box<dyn Future<Output = Result<DataFrame, DataFrameError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
fn get_binned_metrics<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>(
&'life0 self,
path: &'life1 str,
bin: &'life2 f64,
start_time: &'life3 DateTime<Utc>,
end_time: &'life4 DateTime<Utc>,
space: &'life5 str,
name: &'life6 str,
version: &'life7 str,
) -> Pin<Box<dyn Future<Output = Result<DataFrame, DataFrameError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
Get binned metrics from the parquet file
§Arguments
path
- The path to the parquet file (this path should exclude root path)bin
- The bin valuestart_time
- The start time to filterend_time
- The end time to filterspace
- The space to filtername
- The name to filterversion
- The version to filter