Skip to content

Commit 5c7d5c8

Browse files
committed
fix doc
1 parent 9cee08a commit 5c7d5c8

1 file changed

Lines changed: 1 addition & 17 deletions

File tree

datafusion/physical-optimizer/src/simplify_expressions/unwrap_cast.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,6 @@
3030
//!
3131
//! Physical expression: `cast(column as INT64) > INT64(10)`
3232
//! Optimized to: `column > INT32(10)` (assuming column is INT32)
33-
//!
34-
//! # Usage
35-
//!
36-
//! ```rust
37-
//! use datafusion_physical_optimizer::simplify_expressions::PhysicalExprSimplifier;
38-
//! use arrow::datatypes::Schema;
39-
//! use std::sync::Arc;
40-
//! use datafusion_physical_plan::PhysicalExpr;
41-
//!
42-
//! // Apply unwrap cast optimization to a physical expression
43-
//! fn optimize_expression(expr: Arc<dyn PhysicalExpr>, schema: &Schema) -> datafusion_common::Result<Arc<dyn PhysicalExpr>> {
44-
//! let simplifier = PhysicalExprSimplifier::new(schema);
45-
//! let result = simplifier.unwrap_casts(expr)?;
46-
//! Ok(result.data)
47-
//! }
48-
//! ```
4933
5034
use arrow::datatypes::{DataType, Schema};
5135
use datafusion_common::{
@@ -59,7 +43,7 @@ use datafusion_physical_plan::PhysicalExpr;
5943
use std::sync::Arc;
6044

6145
/// Attempts to unwrap casts in comparison expressions.
62-
pub fn unwrap_cast_in_comparison(
46+
pub(crate) fn unwrap_cast_in_comparison(
6347
expr: Arc<dyn PhysicalExpr>,
6448
schema: &Schema,
6549
) -> Result<Transformed<Arc<dyn PhysicalExpr>>> {

0 commit comments

Comments
 (0)