Skip to content

Commit ba06d26

Browse files
committed
Update doc to include added method
1 parent fb8914d commit ba06d26

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ impl<S: SimplifyInfo> ExprSimplifier<S> {
172172
/// fn get_data_type(&self, expr: &Expr) -> Result<DataType> {
173173
/// Ok(DataType::Int32)
174174
/// }
175+
/// fn get_schema(&self) -> Option<&DFSchema> {
176+
/// None
177+
/// }
175178
/// }
176179
///
177180
/// // Create the simplifier
@@ -228,9 +231,10 @@ impl<S: SimplifyInfo> ExprSimplifier<S> {
228231
) -> Result<(Transformed<Expr>, u32)> {
229232
let mut simplifier = Simplifier::new(&self.info);
230233

234+
let empty_schema = DFSchema::empty();
231235
let mut const_evaluator = ConstEvaluator::try_new(
232236
self.info.execution_props(),
233-
self.info.get_schema().unwrap_or(&DFSchema::empty()),
237+
self.info.get_schema().unwrap_or(&empty_schema),
234238
)?;
235239
let mut shorten_in_list_simplifier = ShortenInListSimplifier::new();
236240
let mut guarantee_rewriter = GuaranteeRewriter::new(&self.guarantees);

0 commit comments

Comments
 (0)