## Coverage Report

#### Created: 2025-11-22 06:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)

    /Users/andrewlamb/Software/datafusion/datafusion/functions-window-common/src/expr.rs

    Line
    Count
    Source
    1
    // Licensed to the Apache Software Foundation (ASF) under one
    2
    // or more contributor license agreements.  See the NOTICE file
    3
    // distributed with this work for additional information
    4
    // regarding copyright ownership.  The ASF licenses this file
    5
    // to you under the Apache License, Version 2.0 (the
    6
    // "License"); you may not use this file except in compliance
    7
    // with the License.  You may obtain a copy of the License at
    8
    //
    9
    //   http://www.apache.org/licenses/LICENSE-2.0
    10
    //
    11
    // Unless required by applicable law or agreed to in writing,
    12
    // software distributed under the License is distributed on an
    13
    // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    14
    // KIND, either express or implied.  See the License for the
    15
    // specific language governing permissions and limitations
    16
    // under the License.
    17
    18
    use datafusion_common::arrow::datatypes::FieldRef;
    19
    use datafusion_physical_expr_common::physical_expr::PhysicalExpr;
    20
    use std::sync::Arc;
    21
    22
    /// Arguments passed to user-defined window function
    23
    #[derive(Debug, Default)]
    24
    pub struct ExpressionArgs<'a> {
    25
        /// The expressions passed as arguments to the user-defined window
    26
        /// function.
    27
        input_exprs: &'a [Arc<dyn PhysicalExpr>],
    28
        /// The corresponding fields of expressions passed as arguments
    29
        /// to the user-defined window function.
    30
        input_fields: &'a [FieldRef],
    31
    }
    32
    33
    impl<'a> ExpressionArgs<'a> {
    34
        /// Create an instance of [`ExpressionArgs`].
    35
        ///
    36
        /// # Arguments
    37
        ///
    38
        /// * `input_exprs` - The expressions passed as arguments
    39
        ///   to the user-defined window function.
    40
        /// * `input_fields` - The fields corresponding to the
    41
        ///   arguments to the user-defined window function.
    42
    0
        pub fn new(
    43
    0
            input_exprs: &'a [Arc<dyn PhysicalExpr>],
    44
    0
            input_fields: &'a [FieldRef],
    45
    0
        ) -> Self {
    46
    0
            Self {
    47
    0
                input_exprs,
    48
    0
                input_fields,
    49
    0
            }
    50
    0
        }
    51
    52
        /// Returns the expressions passed as arguments to the user-defined
    53
        /// window function.
    54
    0
        pub fn input_exprs(&self) -> &'a [Arc<dyn PhysicalExpr>] {
    55
    0
            self.input_exprs
    56
    0
        }
    57
    58
        /// Returns the [`FieldRef`]s corresponding to the input expressions
    59
        /// to the user-defined window function.
    60
    0
        pub fn input_fields(&self) -> &'a [FieldRef] {
    61
    0
            self.input_fields
    62
    0
        }
    63
    }