@@ -106,76 +106,20 @@ impl VTable for BitPacked {
106106 data. validate_against_slots ( dtype, len, & validity, patches. as_ref ( ) )
107107 }
108108
109- fn array_hash < H : std:: hash:: Hasher > (
110- array : ArrayView < ' _ , Self > ,
111- state : & mut H ,
112- precision : Precision ,
113- ) {
114- array. offset . hash ( state) ;
115- array. bit_width . hash ( state) ;
116- array. packed . array_hash ( state, precision) ;
117- match array. patch_indices ( ) {
118- Some ( indices) => {
119- true . hash ( state) ;
120- indices. array_hash ( state, precision) ;
121- }
122- None => false . hash ( state) ,
123- }
124- match array. patch_values ( ) {
125- Some ( values) => {
126- true . hash ( state) ;
127- values. array_hash ( state, precision) ;
128- }
129- None => false . hash ( state) ,
130- }
131- match array. patch_chunk_offsets ( ) {
132- Some ( offsets) => {
133- true . hash ( state) ;
134- offsets. array_hash ( state, precision) ;
135- }
136- None => false . hash ( state) ,
137- }
138- match array. validity_child ( ) {
139- Some ( validity) => {
140- true . hash ( state) ;
141- validity. array_hash ( state, precision) ;
142- }
143- None => false . hash ( state) ,
144- }
145- array. patch_offset . hash ( state) ;
146- array. patch_offset_within_chunk . hash ( state) ;
109+ fn array_hash < H : std:: hash:: Hasher > ( data : & BitPackedData , state : & mut H , precision : Precision ) {
110+ data. offset . hash ( state) ;
111+ data. bit_width . hash ( state) ;
112+ data. packed . array_hash ( state, precision) ;
113+ data. patch_offset . hash ( state) ;
114+ data. patch_offset_within_chunk . hash ( state) ;
147115 }
148116
149- fn array_eq (
150- array : ArrayView < ' _ , Self > ,
151- other : ArrayView < ' _ , Self > ,
152- precision : Precision ,
153- ) -> bool {
154- array. offset == other. offset
155- && array. bit_width == other. bit_width
156- && array. packed . array_eq ( & other. packed , precision)
157- && match ( array. patch_indices ( ) , other. patch_indices ( ) ) {
158- ( Some ( lhs) , Some ( rhs) ) => lhs. array_eq ( rhs, precision) ,
159- ( None , None ) => true ,
160- _ => false ,
161- }
162- && match ( array. patch_values ( ) , other. patch_values ( ) ) {
163- ( Some ( lhs) , Some ( rhs) ) => lhs. array_eq ( rhs, precision) ,
164- ( None , None ) => true ,
165- _ => false ,
166- }
167- && match ( array. patch_chunk_offsets ( ) , other. patch_chunk_offsets ( ) ) {
168- ( Some ( lhs) , Some ( rhs) ) => lhs. array_eq ( rhs, precision) ,
169- ( None , None ) => true ,
170- _ => false ,
171- }
172- && match ( array. validity_child ( ) , other. validity_child ( ) ) {
173- ( Some ( lhs) , Some ( rhs) ) => lhs. array_eq ( rhs, precision) ,
174- ( None , None ) => true ,
175- _ => false ,
176- }
177- && array. patch_offset == other. patch_offset
178- && array. patch_offset_within_chunk == other. patch_offset_within_chunk
117+ fn array_eq ( data : & BitPackedData , other : & BitPackedData , precision : Precision ) -> bool {
118+ data. offset == other. offset
119+ && data. bit_width == other. bit_width
120+ && data. packed . array_eq ( & other. packed , precision)
121+ && data. patch_offset == other. patch_offset
122+ && data. patch_offset_within_chunk == other. patch_offset_within_chunk
179123 }
180124
181125 fn nbuffers ( _array : ArrayView < ' _ , Self > ) -> usize {
0 commit comments