Skip to content

Commit 22a282d

Browse files
committed
add module level comments
1 parent 8375cf6 commit 22a282d

File tree

15 files changed

+41
-14
lines changed

15 files changed

+41
-14
lines changed

datafusion-expr/src/accumulator.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
//! Accumulator module contains the trait definition for aggregation function's accumulators.
19+
1820
use arrow::array::ArrayRef;
1921
use datafusion_common::{Result, ScalarValue};
2022
use std::fmt::Debug;

datafusion-expr/src/aggregate_function.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
//! Aggregate function module contains all built-in aggregate functions definitions
19+
1820
use datafusion_common::{DataFusionError, Result};
1921
use std::{fmt, str::FromStr};
2022

datafusion-expr/src/built_in_function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
//! Built-in functions
18+
//! Built-in functions module contains all the built-in functions definitions.
1919
2020
use crate::Volatility;
2121
use datafusion_common::{DataFusionError, Result};

datafusion-expr/src/columnar_value.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
//! Columnar value module contains a set of types that represent a columnar value.
19+
1820
use arrow::array::ArrayRef;
1921
use arrow::array::NullArray;
2022
use arrow::datatypes::DataType;

datafusion-expr/src/expr.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
//! Expr module contains core type definition for `Expr`.
19+
1820
use crate::aggregate_function;
1921
use crate::built_in_function;
2022
use crate::expr_fn::binary_expr;

datafusion-expr/src/expr_fn.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
//! Expr fn module contains the functional definitions for expressions.
19+
1820
use crate::{aggregate_function, built_in_function, lit, Expr, Operator};
1921

2022
/// Create a column expression based on a qualified or unqualified column name
2123
pub fn col(ident: &str) -> Expr {
2224
Expr::Column(ident.into())
2325
}
2426

25-
/// return a new expression l <op> r
27+
/// Return a new expression l <op> r
2628
pub fn binary_expr(l: Expr, op: Operator, r: Expr) -> Expr {
2729
Expr::BinaryExpr {
2830
left: Box::new(l),
@@ -31,7 +33,7 @@ pub fn binary_expr(l: Expr, op: Operator, r: Expr) -> Expr {
3133
}
3234
}
3335

34-
/// return a new expression with a logical AND
36+
/// Return a new expression with a logical AND
3537
pub fn and(left: Expr, right: Expr) -> Expr {
3638
Expr::BinaryExpr {
3739
left: Box::new(left),
@@ -40,7 +42,7 @@ pub fn and(left: Expr, right: Expr) -> Expr {
4042
}
4143
}
4244

43-
/// return a new expression with a logical OR
45+
/// Return a new expression with a logical OR
4446
pub fn or(left: Expr, right: Expr) -> Expr {
4547
Expr::BinaryExpr {
4648
left: Box::new(left),
@@ -265,7 +267,7 @@ scalar_expr!(Upper, upper, string);
265267
scalar_expr!(DatePart, date_part, part, date);
266268
scalar_expr!(DateTrunc, date_trunc, part, date);
267269

268-
/// returns an array of fixed size with each argument on it.
270+
/// Returns an array of fixed size with each argument on it.
269271
pub fn array(args: Vec<Expr>) -> Expr {
270272
Expr::ScalarFunction {
271273
fun: built_in_function::BuiltinScalarFunction::Array,

datafusion-expr/src/function.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
//! Function module contains typing and signature for built-in and user defined functions.
19+
1820
use crate::Accumulator;
1921
use crate::ColumnarValue;
2022
use arrow::datatypes::DataType;

datafusion-expr/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ pub use columnar_value::{ColumnarValue, NullColumnarValue};
3737
pub use expr::Expr;
3838
pub use expr_fn::col;
3939
pub use function::{
40-
AccumulatorFunctionImplementation, ReturnTypeFunction, ScalarFunctionImplementation,
41-
StateTypeFunction,
40+
AccumulatorFunctionImplementation, ReturnTypeFunction, ScalarFunctionImplementation,
41+
StateTypeFunction,
4242
};
4343
pub use literal::{lit, lit_timestamp_nano, Literal, TimestampLiteral};
4444
pub use operator::Operator;

datafusion-expr/src/literal.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
//! Literal module contains foundational types that are used to represent literals in DataFusion.
19+
1820
use crate::Expr;
1921
use datafusion_common::ScalarValue;
2022

datafusion-expr/src/operator.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
//! Operator module contains foundational types that are used to represent operators in DataFusion.
19+
1820
use crate::expr_fn::binary_expr;
1921
use crate::Expr;
2022
use std::fmt;

0 commit comments

Comments
 (0)