Repository: influxdata/influxdb
File: influxdb3_write/src/lib.rs (Rust)

Code before:
            .position(|f| f.name() == TIME_COLUMN_NAME)
            .context("table should have a time column")?;

        // DF schema and execution properties used for handling physical expressions:
        let df_schema = DFSchema::try_from(Arc::clone(&arrow_schema))
            .context("table schema was not able to convert to datafusion schema")?;
        let props = ExecutionProps::new();

        for expr in exprs.iter().filter(|e| {
            // NOTE: filter out most expression types, as they are not relevant to
            // time bound analysis:
            matches!(e, Expr::BinaryExpr(_) | Expr::Not(_) | Expr::Between(_))
            // Check if the expression refers to the `time` column:
                && e.column_refs()
                    .contains(&Column::new_unqualified(TIME_COLUMN_NAME))
        }) {
            let Ok(physical_expr) = create_physical_expr(expr, &df_schema, &props) else {
                continue;
            };
            // Determine time bounds, if provided:
            let boundaries = ExprBoundaries::try_new_unbounded(&arrow_schema)
                .context("unable to create unbounded expr boundaries on incoming expression")?;
            let Ok(mut analysis) = analyze(
                &physical_expr,
                AnalysisContext::new(boundaries),
                &arrow_schema,
            )
            .inspect_err(|error| {
                debug!(
                    ?error,
                    logical_expr = ?expr,
                    "unable to analyze provided filters for a boundary on the time column"
                );
            }) else {
                continue;
            };

            // Set the boundaries on the time column using the evaluated
            // interval, if it exists.
            // If an interval was already derived from a previous expression, we
            // take their intersection, or produce an error if:
            // - the derived intervals are not compatible (different types)
            // - the derived intervals do not intersect, this should be a user
            //   error, i.e., a poorly formed query or querying outside of a
            //   retention policy for the table
            if let Some(ExprBoundaries {
                interval: Some(new_interval),
                ..
            }) = (time_col_index < analysis.boundaries.len())
                .then_some(analysis.boundaries.remove(time_col_index))
            {

Review comment (suggestion):
I think it would help to provide some context about why errors are ignored. Perhaps something like
```suggestion
            // DataFusion does not support all possible expressions. If the expression can't be analyzed
            // skip the analysis rather than erroring the query
            // see https://github.com/influxdata/influxdb/issues/26163
            let Ok(mut analysis) = analyze(
```

Code after:
            .position(|f| f.name() == TIME_COLUMN_NAME)
            .context("table should have a time column")?;

        // DF schema and execution properties used for handling physical expressions:
        let df_schema = DFSchema::try_from(Arc::clone(&arrow_schema))
            .context("table schema was not able to convert to datafusion schema")?;
        let props = ExecutionProps::new();

        for expr in exprs.iter().filter(|e| {
            // NOTE: filter out most expression types, as they are not relevant to
            // time bound analysis:
            matches!(e, Expr::BinaryExpr(_) | Expr::Not(_) | Expr::Between(_))
            // Check if the expression refers to the `time` column:
                && e.column_refs()
                    .contains(&Column::new_unqualified(TIME_COLUMN_NAME))
        }) {
            let Ok(physical_expr) = create_physical_expr(expr, &df_schema, &props) else {
                continue;
            };
            // Determine time bounds, if provided:
            let boundaries = ExprBoundaries::try_new_unbounded(&arrow_schema)
                .context("unable to create unbounded expr boundaries on incoming expression")?;
            // DataFusion does not support all possible expressions. If the expression can't be analyzed
            // skip the analysis rather than erroring the query
            // see https://github.com/influxdata/influxdb/issues/26163
            let Ok(mut analysis) = analyze(
                &physical_expr,
                AnalysisContext::new(boundaries),
                &arrow_schema,
            )
            .inspect_err(|error| {
                debug!(
                    ?error,
                    logical_expr = ?expr,
                    "unable to analyze provided filters for a boundary on the time column"
                );
            }) else {
                continue;
            };

            // Set the boundaries on the time column using the evaluated
            // interval, if it exists.
            // If an interval was already derived from a previous expression, we
            // take their intersection, or produce an error if:
            // - the derived intervals are not compatible (different types)
            // - the derived intervals do not intersect, this should be a user
            //   error, i.e., a poorly formed query or querying outside of a
            //   retention policy for the table
            if let Some(ExprBoundaries {
                interval: Some(new_interval),
                ..