pub fn expire_if_sort_key_does_not_cover(
        &self,
        partition_id: PartitionId,
        columns: &HashSet<String>,
    ) {
        self.backend.remove_if(&partition_id, |cached_partition| {
            if let Some(sort_key) = cached_partition.sort_key.as_ref().as_ref() {
                let covered: HashSet<_> = sort_key
                    .iter()
                    .map(|(col, _options)| Arc::clone(col))
                    .collect();
                columns.iter().any(|col| !covered.contains(col.as_str()))
            } else {
                // no sort key at all => need to update
                true
            }
        });
    }
/// Expire partition if the cached sort key does NOT cover the given set of columns.
Expire partition if the cached sort key does NOT cover the given set of columns.
Expire partition if the cached sort key does NOT cover the given set of columns .
pub fn expire_if_sort_key_does_not_cover(
        &self,
        partition_id: PartitionId,
        columns: &HashSet<String>,
    ) {
        self.backend.remove_if(&partition_id, |cached_partition| {
            if let Some(sort_key) = cached_partition.sort_key.as_ref().as_ref() {
                let covered: HashSet<_> = sort_key
                    .iter()
                    .map(|(col, _options)| Arc::clone(col))
                    .collect();
                columns.iter().any(|col| !covered.contains(col.as_str()))
            } else {
                // no sort key at all => need to update
                true
            }
        });
    }
pub fn expire_if_sort_key_does_not_cover ( & self , partition_id : PartitionId , columns : & HashSet < String > , ) { self . backend . remove_if ( & partition_id , | cached_partition | { if let Some ( sort_key ) = cached_partition . sort_key . as_ref ( ) . as_ref ( ) { let covered : HashSet < _ > = sort_key . iter ( ) . map ( | ( col , _options ) | Arc :: clone ( col ) ) . collect ( ) ; columns . iter ( ) . any ( | col | ! covered . contains ( col . as_str ( ) ) ) } else { // no sort key at all => need to update true } } ) ; }
Expire partition if the cached sort key does NOT cover the given set of columns.
Expire partition if the cached sort key does NOT cover the given set of columns .
&self
partition_id
PartitionId
columns
&HashSet<String>
&self
partition_id
PartitionId
columns
&HashSet<String>