/// Returns the distinct set of table names that contain data satisfying the
/// provided predicate.
///
/// `skip_table_names` can be used to provide a set of table names to
/// skip, typically because they're already included in results from other
/// chunks.
Returns the distinct set of table names that contain data satisfying the
provided predicate.

`skip_table_names` can be used to provide a set of table names to
skip, typically because they're already included in results from other
chunks.
Returns the distinct set of table names that contain data satisfying the provided predicate . ` skip_table_names ` can be used to provide a set of table names to skip typically because they ' re already included in results from other chunks .
pub fn table_names(
        &self,
        predicate: &Predicate,
        skip_table_names: &BTreeSet<String>,
    ) -> BTreeSet<String> {
        // read lock on chunk.
        let chunk_data = self.chunk_data.read();
        if predicate.is_empty() {
            return chunk_data
                .data
                .keys()
                .filter(|&name| !skip_table_names.contains(name))
                .cloned()
                .collect::<BTreeSet<_>>();
        }
        // TODO(edd): potential contention. The read lock is held on the chunk
        // for the duration of determining if its table satisfies the predicate.
        // This may be expensive in pathological cases. This can be improved
        // by releasing the lock before doing the execution.
        chunk_data
            .data
            .iter()
            .filter_map(|(name, table)| {
                if skip_table_names.contains(name) {
                    return None;
                }
                table
                    .satisfies_predicate(predicate)
                    .then(|| name.to_owned())
            })
            .collect::<BTreeSet<_>>()
    }
pub fn table_names ( & self , predicate : & Predicate , skip_table_names : & BTreeSet < String > , ) -> BTreeSet < String > { // read lock on chunk. let chunk_data = self . chunk_data . read ( ) ; if predicate . is_empty ( ) { return chunk_data . data . keys ( ) . filter ( | & name | ! skip_table_names . contains ( name ) ) . cloned ( ) . collect :: < BTreeSet < _ > > ( ) ; } // TODO(edd): potential contention. The read lock is held on the chunk // for the duration of determining if its table satisfies the predicate. // This may be expensive in pathological cases. This can be improved // by releasing the lock before doing the execution. chunk_data . data . iter ( ) . filter_map ( | ( name , table ) | { if skip_table_names . contains ( name ) { return None ; } table . satisfies_predicate ( predicate ) . then ( | | name . to_owned ( ) ) } ) . collect :: < BTreeSet < _ > > ( ) }
Returns the distinct set of table names that contain data satisfying the
provided predicate.
Returns the distinct set of table names that contain data satisfying the provided predicate .
&self
predicate
&Predicate
skip_table_names
&BTreeSet<String>