@@ -19,7 +19,6 @@ use vortex_array::dtype::FieldMask;
1919use vortex_array:: dtype:: FieldName ;
2020use vortex_array:: dtype:: Nullability ;
2121use vortex_array:: dtype:: StructFields ;
22- use vortex_array:: expr:: ExactExpr ;
2322use vortex_array:: expr:: Expression ;
2423use vortex_array:: expr:: col;
2524use vortex_array:: expr:: make_free_field_annotator;
@@ -59,7 +58,7 @@ pub struct StructReader {
5958 expanded_root_expr : Expression ,
6059
6160 field_lookup : Option < HashMap < FieldName , usize > > ,
62- partitioned_expr_cache : DashMap < ExactExpr , Arc < OnceLock < Partitioned > > > ,
61+ partitioned_expr_cache : DashMap < Expression , Arc < OnceLock < Partitioned > > > ,
6362}
6463
6564impl StructReader {
@@ -154,18 +153,16 @@ impl StructReader {
154153
155154 /// Utility for partitioning an expression over the fields of a struct.
156155 fn partition_expr ( & self , expr : Expression ) -> VortexResult < Partitioned > {
157- let key = ExactExpr ( expr. clone ( ) ) ;
158-
159- if let Some ( entry) = self . partitioned_expr_cache . get ( & key)
156+ if let Some ( entry) = self . partitioned_expr_cache . get ( & expr)
160157 && let Some ( partitioning) = entry. value ( ) . get ( )
161158 {
162159 return Ok ( partitioning. clone ( ) ) ;
163160 }
164161
165- let result = self . compute_partitioned_expr ( expr) ?;
162+ let result = self . compute_partitioned_expr ( expr. clone ( ) ) ?;
166163
167164 self . partitioned_expr_cache
168- . entry ( key )
165+ . entry ( expr )
169166 . or_insert_with ( || Arc :: new ( OnceLock :: new ( ) ) )
170167 . get_or_init ( || result. clone ( ) ) ;
171168
0 commit comments