feat: add a way to retrieve timestamp range from parquet chunk
parent
c54109113e
commit
056c29aaa2
|
@ -146,6 +146,12 @@ impl Chunk {
|
|||
Ok(table.path())
|
||||
}
|
||||
|
||||
/// Return Schema for the specified table / columns
|
||||
pub fn timestamp_range(&self, table_name: &str) -> Result<Option<TimestampRange>> {
|
||||
let table = self.find_table(table_name)?;
|
||||
Ok(table.timestamp_range())
|
||||
}
|
||||
|
||||
// Return all tables of this chunk whose timestamp overlaps with the give one
|
||||
pub fn table_names(
|
||||
&self,
|
||||
|
|
|
@ -96,6 +96,11 @@ impl Table {
|
|||
})
|
||||
}
|
||||
|
||||
/// Return timestamp range of this table
|
||||
pub fn timestamp_range(&self) -> Option<TimestampRange> {
|
||||
self.timestamp_range
|
||||
}
|
||||
|
||||
// Check if 2 time ranges overlap
|
||||
pub fn matches_predicate(&self, timestamp_range: &Option<TimestampRange>) -> bool {
|
||||
match (self.timestamp_range, timestamp_range) {
|
||||
|
|
Loading…
Reference in New Issue