File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
datafusion/optimizer/src/simplify_expressions Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments