File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
datafusion/physical-expr/src Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -177,8 +177,11 @@ impl<'a> PhysicalExprSchemaRewriter<'a> {
177
177
) ;
178
178
}
179
179
180
- let cast_expr =
181
- Arc :: new ( CastExpr :: new ( expr, logical_field. data_type ( ) . clone ( ) , None ) ) ;
180
+ let cast_expr = Arc :: new ( CastExpr :: new (
181
+ Arc :: new ( column) ,
182
+ logical_field. data_type ( ) . clone ( ) ,
183
+ None ,
184
+ ) ) ;
182
185
183
186
Ok ( Transformed :: yes ( cast_expr) )
184
187
}
@@ -280,9 +283,9 @@ mod tests {
280
283
let ( physical_schema, logical_schema) = create_test_schema ( ) ;
281
284
282
285
let rewriter = PhysicalExprSchemaRewriter :: new ( & physical_schema, & logical_schema) ;
283
- let column_expr = Arc :: new ( Column :: new ( "b" , 1 ) ) ;
286
+ let column_expr = Arc :: new ( Column :: new ( "b" , 1 ) ) as Arc < dyn PhysicalExpr > ;
284
287
285
- let result = rewriter. rewrite ( column_expr . clone ( ) ) ?;
288
+ let result = rewriter. rewrite ( Arc :: clone ( & column_expr ) ) ?;
286
289
287
290
// Should be the same expression (no transformation needed)
288
291
// We compare the underlying pointer through the trait object
You can’t perform that action at this time.
0 commit comments