fn to_read_buffer_predicate(
    predicate: &predicate::Predicate,
) -> Result<read_buffer::Predicate, ReadBufferPredicateConversionError> {
    // Try to convert non-time column expressions into binary expressions that are compatible with
    // the read buffer.
    match predicate
        .exprs
        .iter()
        .map(read_buffer::BinaryExpr::try_from)
        .collect::<Result<Vec<_>, _>>()
    {
        Ok(exprs) => {
            // Construct a `ReadBuffer` predicate with or without InfluxDB-specific expressions on
            // the time column.
            Ok(match predicate.range {
                Some(range) => {
                    read_buffer::Predicate::with_time_range(&exprs, range.start(), range.end())
                }
                None => read_buffer::Predicate::new(exprs),
            })
        }
        Err(e) => Err(ReadBufferPredicateConversionError {
            msg: e,
            predicate: predicate.clone(),
        }),
    }
}
/// Converts a [`predicate::Predicate`] into [`read_buffer::Predicate`], suitable for evaluating on
/// the ReadBuffer.
///
/// NOTE: a valid Read Buffer predicate is not guaranteed to be applicable to an arbitrary Read
/// Buffer chunk, because the applicability of a predicate depends on the schema of the chunk.
///
/// Callers should validate predicates against chunks they are to be executed against using
/// `read_buffer::Chunk::validate_predicate`
Converts a [`predicate::Predicate`] into [`read_buffer::Predicate`], suitable for evaluating on
the ReadBuffer.

a valid Read Buffer predicate is not guaranteed to be applicable to an arbitrary Read
Buffer chunk, because the applicability of a predicate depends on the schema of the chunk.

Callers should validate predicates against chunks they are to be executed against using
`read_buffer::Chunk::validate_predicate`
Converts a [ ` predicate :: Predicate ` ] into [ ` read_buffer :: Predicate ` ] suitable for evaluating on the ReadBuffer . a valid Read Buffer predicate is not guaranteed to be applicable to an arbitrary Read Buffer chunk because the applicability of a predicate depends on the schema of the chunk . Callers should validate predicates against chunks they are to be executed against using ` read_buffer :: Chunk :: validate_predicate `
fn to_read_buffer_predicate(
    predicate: &predicate::Predicate,
) -> Result<read_buffer::Predicate, ReadBufferPredicateConversionError> {
    // Try to convert non-time column expressions into binary expressions that are compatible with
    // the read buffer.
    match predicate
        .exprs
        .iter()
        .map(read_buffer::BinaryExpr::try_from)
        .collect::<Result<Vec<_>, _>>()
    {
        Ok(exprs) => {
            // Construct a `ReadBuffer` predicate with or without InfluxDB-specific expressions on
            // the time column.
            Ok(match predicate.range {
                Some(range) => {
                    read_buffer::Predicate::with_time_range(&exprs, range.start(), range.end())
                }
                None => read_buffer::Predicate::new(exprs),
            })
        }
        Err(e) => Err(ReadBufferPredicateConversionError {
            msg: e,
            predicate: predicate.clone(),
        }),
    }
}
fn to_read_buffer_predicate ( predicate : & predicate :: Predicate , ) -> Result < read_buffer :: Predicate , ReadBufferPredicateConversionError > { // Try to convert non-time column expressions into binary expressions that are compatible with // the read buffer. match predicate . exprs . iter ( ) . map ( read_buffer :: BinaryExpr :: try_from ) . collect :: < Result < Vec < _ > , _ > > ( ) { Ok ( exprs ) => { // Construct a `ReadBuffer` predicate with or without InfluxDB-specific expressions on // the time column. Ok ( match predicate . range { Some ( range ) => { read_buffer :: Predicate :: with_time_range ( & exprs , range . start ( ) , range . end ( ) ) } None => read_buffer :: Predicate :: new ( exprs ) , } ) } Err ( e ) => Err ( ReadBufferPredicateConversionError { msg : e , predicate : predicate . clone ( ) , } ) , } }
Converts a [`predicate::Predicate`] into [`read_buffer::Predicate`], suitable for evaluating on
the ReadBuffer.
Converts a [ ` predicate :: Predicate ` ] into [ ` read_buffer :: Predicate ` ] suitable for evaluating on the ReadBuffer .
predicate
&predicate::Predicate
predicate
&predicate::Predicate