@@ -47,7 +47,7 @@ impl WriteFlatBuffer for StatsSet {
4747 fba:: Precision :: Inexact ,
4848 Some ( fbb. create_vector ( & ScalarValue :: to_proto_bytes :: < Vec < u8 > > ( Some ( & min) ) ) ) ,
4949 ) ,
50- Precision :: Absent => ( fba:: Precision :: Absent , None ) ,
50+ Precision :: Absent => ( fba:: Precision :: Inexact , None ) ,
5151 } ;
5252
5353 let ( max_precision, max) = match self . get ( Stat :: Max ) {
@@ -59,7 +59,7 @@ impl WriteFlatBuffer for StatsSet {
5959 fba:: Precision :: Inexact ,
6060 Some ( fbb. create_vector ( & ScalarValue :: to_proto_bytes :: < Vec < u8 > > ( Some ( & max) ) ) ) ,
6161 ) ,
62- Precision :: Absent => ( fba:: Precision :: Absent , None ) ,
62+ Precision :: Absent => ( fba:: Precision :: Inexact , None ) ,
6363 } ;
6464
6565 let sum = self
@@ -132,11 +132,6 @@ impl StatsSet {
132132 if let Some ( max) = fb. max ( )
133133 && let Some ( stat_dtype) = stat_dtype
134134 {
135- let max_precision = fb. max_precision ( ) ;
136- if max_precision == fba:: Precision :: Absent {
137- vortex_bail ! ( "Corrupted max stat: value present with absent precision" ) ;
138- }
139-
140135 let value =
141136 ScalarValue :: from_proto_bytes ( max. bytes ( ) , & stat_dtype, session) ?;
142137 let Some ( value) = value else {
@@ -145,7 +140,7 @@ impl StatsSet {
145140
146141 stats_set. set (
147142 Stat :: Max ,
148- match max_precision {
143+ match fb . max_precision ( ) {
149144 fba:: Precision :: Exact => Precision :: Exact ( value) ,
150145 fba:: Precision :: Inexact => Precision :: Inexact ( value) ,
151146 other => vortex_bail ! ( "Corrupted max_precision field: {other:?}" ) ,
@@ -157,11 +152,6 @@ impl StatsSet {
157152 if let Some ( min) = fb. min ( )
158153 && let Some ( stat_dtype) = stat_dtype
159154 {
160- let min_precision = fb. min_precision ( ) ;
161- if min_precision == fba:: Precision :: Absent {
162- vortex_bail ! ( "Corrupted min stat: value present with absent precision" ) ;
163- }
164-
165155 let value =
166156 ScalarValue :: from_proto_bytes ( min. bytes ( ) , & stat_dtype, session) ?;
167157 let Some ( value) = value else {
@@ -170,7 +160,7 @@ impl StatsSet {
170160
171161 stats_set. set (
172162 Stat :: Min ,
173- match min_precision {
163+ match fb . min_precision ( ) {
174164 fba:: Precision :: Exact => Precision :: Exact ( value) ,
175165 fba:: Precision :: Inexact => Precision :: Inexact ( value) ,
176166 other => vortex_bail ! ( "Corrupted min_precision field: {other:?}" ) ,
0 commit comments