@@ -175,9 +175,10 @@ fn simplify_demo() -> Result<()> {
175175 // the ExecutionProps carries information needed to simplify
176176 // expressions, such as the current time (to evaluate `now()`
177177 // correctly)
178- let context = SimplifyContext :: default ( )
178+ let context = SimplifyContext :: builder ( )
179179 . with_schema ( schema)
180- . with_current_time ( ) ;
180+ . with_current_time ( )
181+ . build ( ) ;
181182 let simplifier = ExprSimplifier :: new ( context) ;
182183
183184 // And then call the simplify_expr function:
@@ -192,9 +193,10 @@ fn simplify_demo() -> Result<()> {
192193
193194 // here are some other examples of what DataFusion is capable of
194195 let schema = Schema :: new ( vec ! [ make_field( "i" , DataType :: Int64 ) ] ) . to_dfschema_ref ( ) ?;
195- let context = SimplifyContext :: default ( )
196+ let context = SimplifyContext :: builder ( )
196197 . with_schema ( Arc :: clone ( & schema) )
197- . with_current_time ( ) ;
198+ . with_current_time ( )
199+ . build ( ) ;
198200 let simplifier = ExprSimplifier :: new ( context) ;
199201
200202 // basic arithmetic simplification
@@ -554,9 +556,10 @@ fn type_coercion_demo() -> Result<()> {
554556 assert ! ( physical_expr. evaluate( & batch) . is_ok( ) ) ;
555557
556558 // 2. Type coercion with `ExprSimplifier::coerce`.
557- let context = SimplifyContext :: default ( )
559+ let context = SimplifyContext :: builder ( )
558560 . with_schema ( Arc :: new ( df_schema. clone ( ) ) )
559- . with_current_time ( ) ;
561+ . with_current_time ( )
562+ . build ( ) ;
560563 let simplifier = ExprSimplifier :: new ( context) ;
561564 let coerced_expr = simplifier. coerce ( expr. clone ( ) , & df_schema) ?;
562565 let physical_expr = datafusion:: physical_expr:: create_physical_expr (
0 commit comments